\input{preamble}

% OK, start here.
%
\begin{document}

\title{Morphisms of Algebraic Stacks}


\maketitle

\phantomsection
\label{section-phantom}

\tableofcontents

\section{Introduction}
\label{section-introduction}

\noindent
In this chapter we introduce some types of morphisms of algebraic stacks.
A reference in the case of quasi-separated algebraic stacks with representable
diagonal is \cite{LM-B}.

\medskip\noindent
The goal is to extend the definition of each of the types of morphisms of
algebraic spaces to morphisms of algebraic stacks. Each case is slightly
different and it seems best to treat them all separately.

\medskip\noindent
For morphisms of algebraic stacks which are representable
by algebraic spaces we have already defined a large number of types of
morphisms, see
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}.
For each corresponding case in this chapter
we have to make sure the definition in the general
case is compatible with the definition given there.




\section{Conventions and abuse of language}
\label{section-conventions}

\noindent
We continue to use the conventions and the abuse of language
introduced in
Properties of Stacks, Section \ref{stacks-properties-section-conventions}.




\section{Properties of diagonals}
\label{section-diagonals}

\noindent
The diagonal of an algebraic stack is closely related to the
$\mathit{Isom}$-sheaves, see
Algebraic Stacks, Lemma \ref{algebraic-lemma-representable-diagonal}.
By the second defining property of an algebraic stack these
$\mathit{Isom}$-sheaves are always algebraic spaces.

\begin{lemma}
\label{lemma-isom-locally-finite-type}
Let $\mathcal{X}$ be an algebraic stack.
Let $T$ be a scheme and let $x, y$ be objects of the fibre category of
$\mathcal{X}$ over $T$. Then the morphism
$\mathit{Isom}_\mathcal{X}(x, y) \to T$ is locally of finite type.
\end{lemma}

\begin{proof}
By
Algebraic Stacks, Lemma \ref{algebraic-lemma-stack-presentation}
we may assume that $\mathcal{X} = [U/R]$ for some smooth
groupoid in algebraic spaces.
By
Descent on Spaces,
Lemma \ref{spaces-descent-lemma-descending-property-locally-finite-type}
it suffices to check the property fppf locally on $T$.
Thus we may assume that $x, y$ come from morphisms
$x', y' : T \to U$. By
Groupoids in Spaces,
Lemma \ref{spaces-groupoids-lemma-quotient-stack-morphisms}
we see that in this case
$\mathit{Isom}_\mathcal{X}(x, y) = T \times_{(y', x'), U \times_S U} R$.
Hence it suffices to prove that $R \to U \times_S U$ is
locally of finite type. This follows from the fact that the composition
$s : R \to U \times_S U \to U$ is smooth (hence locally of finite type, see
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-smooth-locally-finite-presentation} and
\ref{spaces-morphisms-lemma-finite-presentation-finite-type})
and
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-permanence-finite-type}.
\end{proof}

\begin{lemma}
\label{lemma-isom-pseudo-torsor-aut}
Let $\mathcal{X}$ be an algebraic stack.
Let $T$ be a scheme and let $x, y$ be objects of the fibre category of
$\mathcal{X}$ over $T$. Then
\begin{enumerate}
\item $\mathit{Isom}_\mathcal{X}(y, y)$ is a group algebraic space
over $T$, and
\item $\mathit{Isom}_\mathcal{X}(x, y)$ is a pseudo torsor for
$\mathit{Isom}_\mathcal{X}(y, y)$ over $T$.
\end{enumerate}
\end{lemma}

\begin{proof}
See
Groupoids in Spaces,
Definitions \ref{spaces-groupoids-definition-group-space} and
\ref{spaces-groupoids-definition-pseudo-torsor}.
The lemma follows immediately from the fact that $\mathcal{X}$ is a
stack in groupoids.
\end{proof}

\noindent
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The {\it diagonal of $f$} is the morphism
$$
\Delta_f :
\mathcal{X}
\longrightarrow
\mathcal{X} \times_\mathcal{Y} \mathcal{X}
$$
Here are two properties that every diagonal morphism has.

\begin{lemma}
\label{lemma-properties-diagonal}
\begin{slogan}
Diagonals of morphisms of algebraic stacks are representable by
algebraic spaces and locally of finite type.
\end{slogan}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Then
\begin{enumerate}
\item $\Delta_f$ is representable by algebraic spaces,
and
\item $\Delta_f$ is locally of finite type.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $T$ be a scheme and let
$a : T \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
be a morphism. By definition of the fibre product and the
$2$-Yoneda lemma the morphism $a$ is given by a triple
$a = (x, x', \alpha)$ where $x, x'$ are objects of $\mathcal{X}$
over $T$, and $\alpha : f(x) \to f(x')$ is a morphism in the fibre
category of $\mathcal{Y}$ over $T$. By definition of an algebraic
stack the sheaves $\mathit{Isom}_\mathcal{X}(x, x')$ and
$\mathit{Isom}_\mathcal{Y}(f(x), f(x'))$ are algebraic spaces
over $T$. In this language $\alpha$ defines a section of the morphism
$\mathit{Isom}_\mathcal{Y}(f(x), f(x')) \to T$. A $T'$-valued point of
$\mathcal{X} \times_{\mathcal{X} \times_\mathcal{Y} \mathcal{X}, a} T$
for $T' \to T$ a scheme over $T$ is the same thing as an isomorphism
$x|_{T'} \to x'|_{T'}$ whose image under $f$ is $\alpha|_{T'}$.
Thus we see that
\begin{equation}
\label{equation-diagonal}
\vcenter{
\xymatrix{
\mathcal{X} \times_{\mathcal{X} \times_\mathcal{Y} \mathcal{X}, a} T
\ar[d] \ar[r] &
\mathit{Isom}_\mathcal{X}(x, x') \ar[d] \\
T\ar[r]^-\alpha &
\mathit{Isom}_\mathcal{Y}(f(x), f(x'))
}
}
\end{equation}
is a fibre square of sheaves over $T$. In particular we see that
$\mathcal{X} \times_{\mathcal{X} \times_\mathcal{Y} \mathcal{X}, a} T$
is an algebraic space which proves part (1) of the lemma.

\medskip\noindent
To prove the second statement we have to show that the left
vertical arrow of Diagram (\ref{equation-diagonal}) is locally
of finite type. By
Lemma \ref{lemma-isom-locally-finite-type}
the algebraic space $\mathit{Isom}_\mathcal{X}(x, x')$ and
is locally of finite type over $T$. Hence the right vertical arrow of
Diagram (\ref{equation-diagonal}) is locally of finite type, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-permanence-finite-type}.
We conclude by
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-base-change-finite-type}.
\end{proof}

\begin{lemma}
\label{lemma-properties-diagonal-representable}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
which is representable by algebraic spaces. Then
\begin{enumerate}
\item $\Delta_f$ is representable
(by schemes),
\item $\Delta_f$ is locally of finite type,
\item $\Delta_f$ is a monomorphism,
\item $\Delta_f$ is separated, and
\item $\Delta_f$ is locally quasi-finite.
\end{enumerate}
\end{lemma}

\begin{proof}
We have already seen in
Lemma \ref{lemma-properties-diagonal}
that $\Delta_f$ is representable by algebraic
spaces. Hence the statements (2) -- (5) make sense, see
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}.
Also
Lemma \ref{lemma-properties-diagonal}
guarantees (2) holds.
Let $T \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$ be a morphism
and contemplate Diagram (\ref{equation-diagonal}). By
Algebraic Stacks, Lemma
\ref{algebraic-lemma-criterion-map-representable-spaces-fibred-in-groupoids}
the right vertical arrow is injective as a map of sheaves, i.e., a
monomorphism of algebraic spaces. Hence also the morphism
$T \times_{\mathcal{X} \times_\mathcal{Y} \mathcal{X}} \mathcal{X} \to T$
is a monomorphism. Thus (3) holds. We already know that
$T \times_{\mathcal{X} \times_\mathcal{Y} \mathcal{X}} \mathcal{X} \to T$
is locally of finite type. Thus
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-monomorphism-loc-finite-type-loc-quasi-finite}
allows us to conclude that
$T \times_{\mathcal{X} \times_\mathcal{Y} \mathcal{X}} \mathcal{X} \to T$
is locally quasi-finite and separated. This proves (4) and (5).
Finally,
Morphisms of Spaces, Proposition
\ref{spaces-morphisms-proposition-locally-quasi-finite-separated-over-scheme}
implies that
$T \times_{\mathcal{X} \times_\mathcal{Y} \mathcal{X}} \mathcal{X}$
is a scheme which proves (1).
\end{proof}

\begin{lemma}
\label{lemma-representable-separated-diagonal-closed}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
representable by algebraic spaces. Then the following are equivalent
\begin{enumerate}
\item $f$ is separated,
\item $\Delta_f$ is a closed immersion,
\item $\Delta_f$ is proper, or
\item $\Delta_f$ is universally closed.
\end{enumerate}
\end{lemma}

\begin{proof}
The statements
``$f$ is separated'',
``$\Delta_f$ is a closed immersion'',
``$\Delta_f$ is universally closed'', and
``$\Delta_f$ is proper''
refer to the notions defined in
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}.
Choose a scheme $V$ and a surjective smooth morphism $V \to \mathcal{Y}$.
Set $U = \mathcal{X} \times_\mathcal{Y} V$ which is an algebraic
space by assumption, and the morphism $U \to \mathcal{X}$ is surjective
and smooth. By
Categories, Lemma \ref{categories-lemma-base-change-diagonal}
and
Properties of Stacks,
Lemma \ref{stacks-properties-lemma-check-property-covering}
we see that for any property $P$ (as in that lemma) we have:
$\Delta_f$ has $P$ if and only if $\Delta_{U/V} : U \to  U \times_V U$ has $P$.
Hence the equivalence of (2), (3) and (4) follows from
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-separated-diagonal-proper}
applied to $U \to V$.
Moreover, if (1) holds, then $U \to V$ is separated and we see that
$\Delta_{U/V}$ is a closed immersion, i.e., (2) holds.
Finally, assume (2) holds. Let $T$ be a scheme, and $a : T \to \mathcal{Y}$
a morphism. Set $T' = \mathcal{X} \times_\mathcal{Y} T$. To prove
(1) we have to show that the morphism of algebraic spaces $T' \to T$
is separated. Using
Categories, Lemma \ref{categories-lemma-base-change-diagonal}
once more we see that $\Delta_{T'/T}$ is the base change of
$\Delta_f$. Hence our assumption (2) implies that $\Delta_{T'/T}$
is a closed immersion, hence $T' \to T$ is separated as desired.
\end{proof}

\begin{lemma}
\label{lemma-representable-quasi-separated-diagonal-quasi-compact}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
representable by algebraic spaces. Then the following are equivalent
\begin{enumerate}
\item $f$ is quasi-separated,
\item $\Delta_f$ is quasi-compact, or
\item $\Delta_f$ is of finite type.
\end{enumerate}
\end{lemma}

\begin{proof}
The statements
``$f$ is quasi-separated'',
``$\Delta_f$ is quasi-compact'', and
``$\Delta_f$ is of finite type''
refer to the notions defined in
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}.
Note that (2) and (3) are equivalent in view of the fact that
$\Delta_f$ is locally of finite type by
Lemma \ref{lemma-properties-diagonal-representable}
(and
Algebraic Stacks, Lemma
\ref{algebraic-lemma-representable-transformations-property-implication}).
Choose a scheme $V$ and a surjective smooth morphism $V \to \mathcal{Y}$.
Set $U = \mathcal{X} \times_\mathcal{Y} V$ which is an algebraic
space by assumption, and the morphism $U \to \mathcal{X}$ is surjective
and smooth. By
Categories, Lemma \ref{categories-lemma-base-change-diagonal}
and
Properties of Stacks,
Lemma \ref{stacks-properties-lemma-check-property-covering}
we see that we have: $\Delta_f$ is quasi-compact if and only if
$\Delta_{U/V} : U \to  U \times_V U$ is quasi-compact.
If (1) holds, then $U \to V$ is quasi-separated and we see that
$\Delta_{U/V}$ is quasi-compact, i.e., (2) holds.
Assume (2) holds. Let $T$ be a scheme, and $a : T \to \mathcal{Y}$
a morphism. Set $T' = \mathcal{X} \times_\mathcal{Y} T$. To prove
(1) we have to show that the morphism of algebraic spaces $T' \to T$
is quasi-separated. Using
Categories, Lemma \ref{categories-lemma-base-change-diagonal}
once more we see that $\Delta_{T'/T}$ is the base change of
$\Delta_f$. Hence our assumption (2) implies that $\Delta_{T'/T}$
is quasi-compact, hence $T' \to T$ is quasi-separated as desired.
\end{proof}

\begin{lemma}
\label{lemma-representable-locally-separated-diagonal-immersion}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
representable by algebraic spaces. Then the following are equivalent
\begin{enumerate}
\item $f$ is locally separated, and
\item $\Delta_f$ is an immersion.
\end{enumerate}
\end{lemma}

\begin{proof}
The statements ``$f$ is locally separated'', and ``$\Delta_f$ is an immersion''
refer to the notions defined in
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}.
Proof omitted. Hint: Argue as in the proofs of
Lemmas \ref{lemma-representable-separated-diagonal-closed} and
\ref{lemma-representable-quasi-separated-diagonal-quasi-compact}.
\end{proof}






\section{Separation axioms}
\label{section-separated}

\noindent
Let $\mathcal{X} = [U/R]$ be a presentation of an algebraic stack.
Then the properties of the diagonal of $\mathcal{X}$ over $S$, are
the properties of the morphism $j : R \to U \times_S U$. For example,
if $\mathcal{X} = [S/G]$ for some smooth group $G$ in algebraic spaces
over $S$ then $j$ is the structure morphism $G \to S$. Hence the diagonal
is not automatically separated itself (contrary to what happens in the
case of schemes and algebraic spaces). To say that $[S/G]$ is quasi-separated
over $S$ should certainly imply that $G \to S$ is quasi-compact, but we
hesitate to say that $[S/G]$ is quasi-separated over $S$ without also
requiring the morphism $G \to S$ to be quasi-separated. In other words,
requiring the diagonal morphism to be quasi-compact does not really agree
with our intuition for a ``quasi-separated algebraic stack'', and we should
also require the diagonal itself to be quasi-separated.

\medskip\noindent
What about ``separated algebraic stacks''? We have seen in
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-separated-diagonal-proper}
that an algebraic space is separated if and only if the diagonal is proper.
This is the condition that is usually used to define separated algebraic
stacks too. In the example $[S/G] \to S$ above this means that $G \to S$
is a proper group scheme. This means algebraic stacks of the form
$[\Spec(k)/E]$ are proper over $k$ where $E$ is an elliptic curve
over $k$ (insert future reference here). In certain situations it may be
more natural to assume the diagonal is finite.

\begin{definition}
\label{definition-separated}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
\begin{enumerate}
\item We say $f$ is {\it DM} if $\Delta_f$ is unramified\footnote{The
letters DM stand for Deligne-Mumford. If $f$ is DM then given any scheme
$T$ and any morphism $T \to \mathcal{Y}$ the fibre product
$\mathcal{X}_T = \mathcal{X} \times_\mathcal{Y} T$
is an algebraic stack over $T$ whose diagonal is unramified, i.e.,
$\mathcal{X}_T$ is DM. This implies $\mathcal{X}_T$
is a Deligne-Mumford stack, see Theorem \ref{theorem-DM}.
In other words a DM morphism is one whose ``fibres'' are Deligne-Mumford
stacks. This hopefully at least motivates the terminology.}.
\item We say $f$ is {\it quasi-DM} if $\Delta_f$ is
locally quasi-finite\footnote{If $f$ is quasi-DM, then the
``fibres'' $\mathcal{X}_T$ of $\mathcal{X} \to \mathcal{Y}$ are quasi-DM. An
algebraic stack $\mathcal{X}$ is quasi-DM exactly if there exists a
scheme $U$ and a surjective flat morphism $U \to \mathcal{X}$ of finite
presentation which is locally quasi-finite, see
Theorem \ref{theorem-quasi-DM}.
Note the similarity to being Deligne-Mumford, which
is defined in terms of having an \'etale covering by a scheme.}.
\item We say $f$ is {\it separated} if $\Delta_f$ is proper.
\item We say $f$ is {\it quasi-separated} if $\Delta_f$
is quasi-compact and quasi-separated.
\end{enumerate}
\end{definition}

\noindent
In this definition we are using that $\Delta_f$ is representable by algebraic
spaces and we are using
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}
to make sense out of imposing conditions on $\Delta_f$.
We note that these definitions do not conflict with the already
existing notions if $f$ is representable by algebraic spaces, see
Lemmas \ref{lemma-representable-quasi-separated-diagonal-quasi-compact} and
\ref{lemma-representable-separated-diagonal-closed}.
There is an interesting way to characterize these conditions by looking
at higher diagonals, see
Lemma \ref{lemma-definition-separated}.

\begin{definition}
\label{definition-absolute-separated}
Let $\mathcal{X}$ be an algebraic stack over the base scheme $S$.
Denote $p : \mathcal{X} \to S$ the structure morphism.
\begin{enumerate}
\item We say $\mathcal{X}$ is {\it DM over $S$}
if $p : \mathcal{X} \to S$ is DM.
\item We say $\mathcal{X}$ is {\it quasi-DM over $S$}
if $p : \mathcal{X} \to S$ is quasi-DM.
\item We say $\mathcal{X}$ is {\it separated over $S$}
if $p : \mathcal{X} \to S$ is separated.
\item We say $\mathcal{X}$ is {\it quasi-separated over $S$} if
$p : \mathcal{X} \to S$ is quasi-separated.
\item We say $\mathcal{X}$ is {\it DM}
if $\mathcal{X}$ is DM\footnote{Theorem \ref{theorem-DM} shows
that this is equivalent to $\mathcal{X}$ being a Deligne-Mumford stack.}
over $\Spec(\mathbf{Z})$.
\item We say $\mathcal{X}$ is {\it quasi-DM}
if $\mathcal{X}$ is quasi-DM over $\Spec(\mathbf{Z})$.
\item We say $\mathcal{X}$ is {\it separated} if $\mathcal{X}$
is separated over $\Spec(\mathbf{Z})$.
\item We say $\mathcal{X}$ is {\it quasi-separated} if $\mathcal{X}$
is quasi-separated over $\Spec(\mathbf{Z})$.
\end{enumerate}
In the last 4 definitions we view $\mathcal{X}$
as an algebraic stack over $\Spec(\mathbf{Z})$
via
Algebraic Stacks, Definition \ref{algebraic-definition-viewed-as}.
\end{definition}

\noindent
Thus in each case we have an absolute notion and a notion relative to
our given base scheme (mention of which is usually suppressed by our
abuse of notation introduced in
Properties of Stacks, Section \ref{stacks-properties-section-conventions}).
We will see that (1) $\Leftrightarrow$ (5) and (2) $\Leftrightarrow$ (6) in
Lemma \ref{lemma-separated-implies-morphism-separated}.
We spend some time proving some standard results on these notions.

\begin{lemma}
\label{lemma-trivial-implications}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
\begin{enumerate}
\item If $f$ is separated, then $f$ is quasi-separated.
\item If $f$ is DM, then $f$ is quasi-DM.
\item If $f$ is representable by algebraic spaces, then $f$ is DM.
\end{enumerate}
\end{lemma}

\begin{proof}
To see (1) note that a proper morphism of algebraic spaces is quasi-compact
and quasi-separated, see
Morphisms of Spaces, Definition \ref{spaces-morphisms-definition-proper}.
To see (2) note that an unramified morphism of algebraic spaces is locally
quasi-finite, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-unramified-quasi-finite}.
Finally (3) follows from Lemma \ref{lemma-properties-diagonal-representable}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-separated}
All of the separation axioms listed in
Definition \ref{definition-separated}
are stable under base change.
\end{lemma}

\begin{proof}
Let $f : \mathcal{X} \to \mathcal{Y}$ and
$\mathcal{Y}' \to \mathcal{Y}$ be morphisms of algebraic stacks.
Let $f' : \mathcal{Y}' \times_\mathcal{Y} \mathcal{X} \to \mathcal{Y}'$
be the base change of $f$ by $\mathcal{Y}' \to \mathcal{Y}$.
Then $\Delta_{f'}$ is the base change of $\Delta_f$ by the morphism
$\mathcal{X}' \times_{\mathcal{Y}'} \mathcal{X}' \to
\mathcal{X} \times_\mathcal{Y} \mathcal{X}$, see
Categories, Lemma \ref{categories-lemma-base-change-diagonal}.
By the results of
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}
each of the properties of the diagonal used in
Definition \ref{definition-separated}
is stable under base change. Hence the lemma is true.
\end{proof}

\begin{lemma}
\label{lemma-check-separated-covering}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $W \to \mathcal{Y}$ be a surjective, flat, and locally of finite
presentation where $W$ is an algebraic space. If the base change
$W \times_\mathcal{Y} \mathcal{X} \to W$ has one of the separation properties
of Definition \ref{definition-separated}
then so does $f$.
\end{lemma}

\begin{proof}
Denote $g : W \times_\mathcal{Y} \mathcal{X} \to W$ the base change.
Then $\Delta_g$ is the base change of $\Delta_f$ by the morphism
$q : W \times_\mathcal{Y} (\mathcal{X} \times_\mathcal{Y} \mathcal{X})
\to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$. Since $q$ is the base
change of $W \to \mathcal{Y}$ we see that $q$ is representable by algebraic
spaces, surjective, flat, and locally of finite presentation. Hence the
result follows from
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-check-property-weak-covering}.
\end{proof}

\begin{lemma}
\label{lemma-change-of-base-separated}
Let $S$ be a scheme. The property of being
quasi-DM over $S$, quasi-separated over $S$, or separated over $S$ (see
Definition \ref{definition-absolute-separated})
is stable under change of base scheme, see
Algebraic Stacks, Definition \ref{algebraic-definition-change-of-base}.
\end{lemma}

\begin{proof}
Follows immediately from
Lemma \ref{lemma-base-change-separated}.
\end{proof}

\begin{lemma}
\label{lemma-fibre-product-after-map}
Let $f : \mathcal{X} \to \mathcal{Z}$, $g : \mathcal{Y} \to \mathcal{Z}$
and $\mathcal{Z} \to \mathcal{T}$ be morphisms of algebraic stacks.
Consider the induced morphism
$i : \mathcal{X} \times_\mathcal{Z} \mathcal{Y} \to
\mathcal{X} \times_\mathcal{T} \mathcal{Y}$.
Then
\begin{enumerate}
\item $i$ is representable by algebraic spaces and locally of finite type,
\item if $\Delta_{\mathcal{Z}/\mathcal{T}}$ is quasi-separated, then
$i$ is quasi-separated,
\item if $\Delta_{\mathcal{Z}/\mathcal{T}}$ is separated, then
$i$ is separated,
\item if $\mathcal{Z} \to \mathcal{T}$ is DM,
then $i$ is unramified,
\item if $\mathcal{Z} \to \mathcal{T}$ is quasi-DM,
then $i$ is locally quasi-finite,
\item if $\mathcal{Z} \to \mathcal{T}$ is separated, then $i$ is proper, and
\item if $\mathcal{Z} \to \mathcal{T}$ is quasi-separated, then
$i$ is quasi-compact and quasi-separated.
\end{enumerate}
\end{lemma}

\begin{proof}
The following diagram
$$
\xymatrix{
\mathcal{X} \times_\mathcal{Z} \mathcal{Y} \ar[r]_i \ar[d] &
\mathcal{X} \times_\mathcal{T} \mathcal{Y} \ar[d] \\
\mathcal{Z} \ar[r]^-{\Delta_{\mathcal{Z}/\mathcal{T}}} \ar[r] &
\mathcal{Z} \times_\mathcal{T} \mathcal{Z}
}
$$
is a $2$-fibre product diagram, see
Categories, Lemma \ref{categories-lemma-fibre-product-after-map}.
Hence $i$ is the base change of the
diagonal morphism $\Delta_{\mathcal{Z}/\mathcal{T}}$. Thus the lemma follows
from
Lemma \ref{lemma-properties-diagonal},
and the material in
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}.
\end{proof}

\begin{lemma}
\label{lemma-semi-diagonal}
Let $\mathcal{T}$ be an algebraic stack. Let $g : \mathcal{X} \to \mathcal{Y}$
be a morphism of algebraic stacks over $\mathcal{T}$. Consider the graph
$i : \mathcal{X} \to \mathcal{X} \times_\mathcal{T} \mathcal{Y}$ of $g$. Then
\begin{enumerate}
\item $i$ is representable by algebraic spaces and locally of finite type,
\item if $\mathcal{Y} \to \mathcal{T}$ is DM, then $i$ is unramified,
\item if $\mathcal{Y} \to \mathcal{T}$ is quasi-DM, then $i$ is locally
quasi-finite,
\item if $\mathcal{Y} \to \mathcal{T}$ is separated, then $i$ is proper, and
\item if $\mathcal{Y} \to \mathcal{T}$ is quasi-separated, then $i$ is
quasi-compact and quasi-separated.
\end{enumerate}
\end{lemma}

\begin{proof}
This is a special case of Lemma \ref{lemma-fibre-product-after-map}
applied to the morphism
$\mathcal{X} = \mathcal{X} \times_\mathcal{Y} \mathcal{Y} \to
\mathcal{X} \times_\mathcal{T} \mathcal{Y}$.
\end{proof}

\begin{lemma}
\label{lemma-section-immersion}
Let $f : \mathcal{X} \to \mathcal{T}$ be a morphism of algebraic stacks.
Let $s : \mathcal{T} \to \mathcal{X}$ be a morphism such that
$f \circ s$ is $2$-isomorphic to $\text{id}_\mathcal{T}$. Then
\begin{enumerate}
\item $s$ is representable by algebraic spaces and locally of finite type,
\item if $f$ is DM, then $s$ is unramified,
\item if $f$ is quasi-DM, then $s$ is locally quasi-finite,
\item if $f$ is separated, then $s$ is proper, and
\item if $f$ is quasi-separated, then $s$ is quasi-compact and quasi-separated.
\end{enumerate}
\end{lemma}

\begin{proof}
This is a special case of Lemma \ref{lemma-semi-diagonal} applied to
$g = s$ and $\mathcal{Y} = \mathcal{T}$ in which case
$i : \mathcal{T} \to \mathcal{T} \times_\mathcal{T} \mathcal{X}$
is $2$-isomorphic to $s$.
\end{proof}

\begin{lemma}
\label{lemma-composition-separated}
All of the separation axioms listed in
Definition \ref{definition-separated}
are stable under composition of morphisms.
\end{lemma}

\begin{proof}
Let $f : \mathcal{X} \to \mathcal{Y}$ and
$g : \mathcal{Y} \to \mathcal{Z}$ be morphisms of algebraic stacks
to which the axiom in question applies.
The diagonal $\Delta_{\mathcal{X}/\mathcal{Z}}$ is the composition
$$
\mathcal{X} \longrightarrow
\mathcal{X} \times_\mathcal{Y} \mathcal{X} \longrightarrow
\mathcal{X} \times_\mathcal{Z} \mathcal{X}.
$$
Our separation axiom is defined by requiring the diagonal
to have some property $\mathcal{P}$. By
Lemma \ref{lemma-fibre-product-after-map}
above we see that the second arrow also has this property.
Hence the lemma follows since the composition of
morphisms which are representable by algebraic spaces with property
$\mathcal{P}$ also is a morphism with property $\mathcal{P}$, see
our general discussion in
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}
and
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-composition-unramified},
\ref{spaces-morphisms-lemma-composition-quasi-finite},
\ref{spaces-morphisms-lemma-composition-proper},
\ref{spaces-morphisms-lemma-composition-quasi-compact}, and
\ref{spaces-morphisms-lemma-composition-separated}.
\end{proof}

\begin{lemma}
\label{lemma-separated-over-separated}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
over the base scheme $S$.
\begin{enumerate}
\item If $\mathcal{Y}$ is DM over $S$ and $f$ is DM,
then $\mathcal{X}$ is DM over $S$.
\item If $\mathcal{Y}$ is quasi-DM over $S$ and $f$ is quasi-DM,
then $\mathcal{X}$ is quasi-DM over $S$.
\item If $\mathcal{Y}$ is separated over $S$ and $f$ is separated,
then $\mathcal{X}$ is separated over $S$.
\item If $\mathcal{Y}$ is quasi-separated over $S$ and $f$ is quasi-separated,
then $\mathcal{X}$ is quasi-separated over $S$.
\item If $\mathcal{Y}$ is DM and $f$ is DM,
then $\mathcal{X}$ is DM.
\item If $\mathcal{Y}$ is quasi-DM and $f$ is quasi-DM,
then $\mathcal{X}$ is quasi-DM.
\item If $\mathcal{Y}$ is separated and $f$ is separated,
then $\mathcal{X}$ is separated.
\item If $\mathcal{Y}$ is quasi-separated and $f$ is quasi-separated,
then $\mathcal{X}$ is quasi-separated.
\end{enumerate}
\end{lemma}

\begin{proof}
Parts (1), (2), (3), and (4) follow immediately from
Lemma \ref{lemma-composition-separated}
and
Definition \ref{definition-absolute-separated}.
For (5), (6), (7), and (8) think of $\mathcal{X}$ and $\mathcal{Y}$ as
algebraic stacks over $\Spec(\mathbf{Z})$ and apply
Lemma \ref{lemma-composition-separated}.
Details omitted.
\end{proof}

\noindent
The following lemma is a bit different to the analogue for algebraic
spaces. To compare take a look at
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-compose-after-separated}.

\begin{lemma}
\label{lemma-compose-after-separated}
Let $f : \mathcal{X} \to \mathcal{Y}$ and
$g : \mathcal{Y} \to \mathcal{Z}$ be morphisms of algebraic stacks.
\begin{enumerate}
\item If $g \circ f$ is DM then so is $f$.
\item If $g \circ f$ is quasi-DM then so is $f$.
\item If $g \circ f$ is separated and $\Delta_g$ is separated, then
$f$ is separated.
\item If $g \circ f$ is quasi-separated and
$\Delta_g$ is quasi-separated, then $f$ is quasi-separated.
\end{enumerate}
\end{lemma}

\begin{proof}
Consider the factorization
$$
\mathcal{X} \to
\mathcal{X} \times_\mathcal{Y} \mathcal{X} \to
\mathcal{X} \times_\mathcal{Z} \mathcal{X}
$$
of the diagonal morphism of $g \circ f$. Both morphisms are representable by
algebraic spaces, see
Lemmas \ref{lemma-properties-diagonal} and
\ref{lemma-fibre-product-after-map}.
Hence for any scheme $T$ and morphism
$T \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
we get morphisms of algebraic spaces
$$
A = \mathcal{X} \times_{(\mathcal{X} \times_\mathcal{Z} \mathcal{X})} T
\longrightarrow
B = (\mathcal{X} \times_\mathcal{Y} \mathcal{X})
\times_{(\mathcal{X} \times_\mathcal{Z} \mathcal{X})} T
\longrightarrow
T.
$$
If $g \circ f$ is DM (resp.\ quasi-DM), then the composition $A \to T$
is unramified (resp.\ locally quasi-finite). Hence (1) (resp.\ (2))
follows on applying
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-permanence-unramified}
(resp.
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-permanence-quasi-finite}).
This proves (1) and (2).

\medskip\noindent
Proof of (4). Assume $g \circ f$ is quasi-separated and $\Delta_g$ is
quasi-separated. Consider the factorization
$$
\mathcal{X} \to
\mathcal{X} \times_\mathcal{Y} \mathcal{X} \to
\mathcal{X} \times_\mathcal{Z} \mathcal{X}
$$
of the diagonal morphism of $g \circ f$. Both morphisms are
representable by algebraic spaces and the second one is quasi-separated, see
Lemmas \ref{lemma-properties-diagonal} and
\ref{lemma-fibre-product-after-map}.
Hence for any scheme $T$ and morphism
$T \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
we get morphisms of algebraic spaces
$$
A = \mathcal{X} \times_{(\mathcal{X} \times_\mathcal{Z} \mathcal{X})} T
\longrightarrow
B = (\mathcal{X} \times_\mathcal{Y} \mathcal{X})
\times_{(\mathcal{X} \times_\mathcal{Z} \mathcal{X})} T
\longrightarrow
T
$$
such that $B \to T$ is quasi-separated.
The composition $A \to T$ is quasi-compact and quasi-separated
as we have assumed that $g \circ f$ is quasi-separated.
Hence $A \to B$ is quasi-separated by
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-compose-after-separated}.
And $A \to B$ is quasi-compact by
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-quasi-compact-permanence}.
Thus $f$ is quasi-separated.

\medskip\noindent
Proof of (3). Assume $g \circ f$ is separated and $\Delta_g$ is
separated. Consider the factorization
$$
\mathcal{X} \to
\mathcal{X} \times_\mathcal{Y} \mathcal{X} \to
\mathcal{X} \times_\mathcal{Z} \mathcal{X}
$$
of the diagonal morphism of $g \circ f$. Both morphisms are
representable by algebraic spaces and the second one is separated, see
Lemmas \ref{lemma-properties-diagonal} and
\ref{lemma-fibre-product-after-map}.
Hence for any scheme $T$ and morphism
$T \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
we get morphisms of algebraic spaces
$$
A = \mathcal{X} \times_{(\mathcal{X} \times_\mathcal{Z} \mathcal{X})} T
\longrightarrow
B = (\mathcal{X} \times_\mathcal{Y} \mathcal{X})
\times_{(\mathcal{X} \times_\mathcal{Z} \mathcal{X})} T
\longrightarrow
T
$$
such that $B \to T$ is separated.
The composition $A \to T$ is proper as we have assumed that
$g \circ f$ is quasi-separated. Hence $A \to B$ is proper by
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-universally-closed-permanence}
which means that $f$ is separated.
\end{proof}

\begin{lemma}
\label{lemma-separated-implies-morphism-separated}
Let $\mathcal{X}$ be an algebraic stack over the base scheme $S$.
\begin{enumerate}
\item
$\mathcal{X}$ is DM $\Leftrightarrow$
$\mathcal{X}$ is DM over $S$.
\item
$\mathcal{X}$ is quasi-DM $\Leftrightarrow$
$\mathcal{X}$ is quasi-DM over $S$.
\item If $\mathcal{X}$ is separated, then
$\mathcal{X}$ is separated over $S$.
\item If $\mathcal{X}$ is quasi-separated, then
$\mathcal{X}$ is quasi-separated over $S$.
\end{enumerate}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
over the base scheme $S$.
\begin{enumerate}
\item[(5)] If $\mathcal{X}$ is DM over $S$, then $f$ is DM.
\item[(6)] If $\mathcal{X}$ is quasi-DM over $S$, then $f$ is quasi-DM.
\item[(7)] If $\mathcal{X}$ is separated over $S$ and
$\Delta_{\mathcal{Y}/S}$ is separated, then $f$ is separated.
\item[(8)] If $\mathcal{X}$ is quasi-separated over $S$ and
$\Delta_{\mathcal{Y}/S}$ is quasi-separated, then $f$ is quasi-separated.
\end{enumerate}
\end{lemma}

\begin{proof}
Parts (5), (6), (7), and (8) follow immediately from
Lemma \ref{lemma-compose-after-separated}
and
Spaces, Definition \ref{spaces-definition-separated}.
To prove (3) and (4) think of $X$ and $Y$ as algebraic stacks over
$\Spec(\mathbf{Z})$ and apply
Lemma \ref{lemma-compose-after-separated}.
Similarly, to prove (1) and (2), think of $\mathcal{X}$ as an algebraic
stack over $\Spec(\mathbf{Z})$ consider the
morphisms
$$
\mathcal{X} \longrightarrow
\mathcal{X} \times_S \mathcal{X} \longrightarrow
\mathcal{X} \times_{\Spec(\mathbf{Z})} \mathcal{X}
$$
Both arrows are representable by algebraic spaces.
The second arrow is unramified and locally quasi-finite as the base change of
the immersion $\Delta_{S/\mathbf{Z}}$. Hence the composition is
unramified (resp.\ locally quasi-finite) if and only if the first arrow
is unramified (resp.\ locally quasi-finite), see
Morphisms of Spaces,
Lemmas \ref{spaces-morphisms-lemma-composition-unramified} and
\ref{spaces-morphisms-lemma-permanence-unramified}
(resp.\ Morphisms of Spaces,
Lemmas \ref{spaces-morphisms-lemma-composition-quasi-finite} and
\ref{spaces-morphisms-lemma-permanence-quasi-finite}).
\end{proof}

\begin{lemma}
\label{lemma-properties-covering-imply-diagonal}
Let $\mathcal{X}$ be an algebraic stack.
Let $W$ be an algebraic space, and let $f : W \to \mathcal{X}$
be a surjective, flat, locally finitely presented morphism.
\begin{enumerate}
\item If $f$ is unramified (i.e., \'etale, i.e., $\mathcal{X}$
is Deligne-Mumford), then $\mathcal{X}$ is DM.
\item If $f$ is locally quasi-finite, then $\mathcal{X}$ is quasi-DM.
\end{enumerate}
\end{lemma}

\begin{proof}
Note that if $f$ is unramified, then it is \'etale by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-unramified-flat-lfp-etale}.
This explains the parenthetical remark in (1).
Assume $f$ is unramified (resp.\ locally quasi-finite). We have to show that
$\Delta_\mathcal{X} : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$
is unramified (resp.\ locally quasi-finite). Note that
$W \times W \to \mathcal{X} \times \mathcal{X}$ is also
surjective, flat, and locally of finite presentation. Hence it suffices to
show that
$$
W \times_{\mathcal{X} \times \mathcal{X}, \Delta_\mathcal{X}} \mathcal{X}
=
W \times_\mathcal{X} W
\longrightarrow
W \times W
$$
is unramified (resp.\ locally quasi-finite), see
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-check-property-covering}.
By assumption the morphism $\text{pr}_i : W \times_\mathcal{X} W \to W$
is unramified (resp.\ locally quasi-finite). Hence
the displayed arrow is unramified (resp.\ locally quasi-finite) by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-permanence-unramified}
(resp.\ Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-permanence-quasi-finite}).
\end{proof}

\begin{lemma}
\label{lemma-monomorphism-separated}
A monomorphism of algebraic stacks is separated and DM.
The same is true for immersions of algebraic stacks.
\end{lemma}

\begin{proof}
If $f : \mathcal{X} \to \mathcal{Y}$ is a monomorphism of algebraic stacks,
then $\Delta_f$ is an isomorphism, see
Properties of Stacks, Lemma \ref{stacks-properties-lemma-monomorphism}.
Since an isomorphism of algebraic spaces is proper and unramified we
see that $f$ is separated and DM. The second assertion follows from the
first as an immersion is a monomorphism, see
Properties of Stacks,
Lemma \ref{stacks-properties-lemma-immersion-monomorphism}.
\end{proof}

\begin{lemma}
\label{lemma-separation-properties-residual-gerbe}
Let $\mathcal{X}$ be an algebraic stack. Let $x \in |\mathcal{X}|$.
Assume the residual gerbe $\mathcal{Z}_x$ of $\mathcal{X}$ at $x$ exists.
If $\mathcal{X}$ is DM, resp.\ quasi-DM, resp.\ separated,
resp.\ quasi-separated, then so is $\mathcal{Z}_x$.
\end{lemma}

\begin{proof}
This is true because $\mathcal{Z}_x \to \mathcal{X}$ is a monomorphism
hence DM and separated by
Lemma \ref{lemma-monomorphism-separated}.
Apply
Lemma \ref{lemma-separated-over-separated}
to conclude.
\end{proof}


















\section{Inertia stacks}
\label{section-inertia}

\noindent
The (relative) inertia stack of a stack in groupoids is defined in
Stacks, Section \ref{stacks-section-the-inertia-stack}.
The actual construction, in the setting of fibred categories, and some
of its properties is in
Categories, Section \ref{categories-section-inertia}.

\begin{lemma}
\label{lemma-inertia}
Let $\mathcal{X}$ be an algebraic stack. Then the inertia stack
$\mathcal{I}_\mathcal{X}$ is an algebraic stack as well.
The morphism
$$
\mathcal{I}_\mathcal{X} \longrightarrow \mathcal{X}
$$
is representable by algebraic spaces and locally of finite type.
More generally, let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism
of algebraic stacks. Then the relative inertia
$\mathcal{I}_{\mathcal{X}/\mathcal{Y}}$ is an algebraic stack and the
morphism
$$
\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \longrightarrow \mathcal{X}
$$
is representable by algebraic spaces and locally of finite type.
\end{lemma}

\begin{proof}
By
Categories, Lemma \ref{categories-lemma-inertia-fibred-category}
there are equivalences
$$
\mathcal{I}_\mathcal{X} \to
\mathcal{X} \times_{\Delta, \mathcal{X} \times_S \mathcal{X}, \Delta}
\mathcal{X}
\quad\text{and}\quad
\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \to
\mathcal{X}
\times_{\Delta, \mathcal{X} \times_\mathcal{Y} \mathcal{X}, \Delta}
\mathcal{X}
$$
which shows that the inertia stacks are algebraic stacks.
Let $T \to \mathcal{X}$ be a morphism given by
the object $x$ of the fibre category of $\mathcal{X}$ over $T$.
Then we get a $2$-fibre product square
$$
\xymatrix{
\mathit{Isom}_\mathcal{X}(x, x) \ar[d] \ar[r] &
\mathcal{I}_\mathcal{X} \ar[d] \\
T \ar[r]^x & \mathcal{X}
}
$$
This follows immediately from the definition of $\mathcal{I}_\mathcal{X}$.
Since $\mathit{Isom}_\mathcal{X}(x, x)$ is always an algebraic space
locally of finite type over $T$ (see
Lemma \ref{lemma-isom-locally-finite-type})
we conclude that $\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is representable
by algebraic spaces and locally of finite type. Finally, for
the relative inertia we get
$$
\vcenter{
\xymatrix{
\mathit{Isom}_\mathcal{X}(x, x) \ar[d] &
K \ar[l] \ar[d] \ar[r] &
\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \ar[d] \\
\mathit{Isom}_\mathcal{Y}(f(x), f(x)) &
T \ar[l]_-e \ar[r]^x & \mathcal{X}
}
}
$$
with both squares $2$-fibre products. This follows from
Categories, Lemma \ref{categories-lemma-relative-inertia-as-fibre-product}.
The left vertical arrow is a morphism of algebraic spaces locally of finite
type over $T$, and hence is locally of finite type, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-permanence-finite-type}.
Thus $K$ is an algebraic space and $K \to T$ is locally of finite type.
This proves the assertion on the relative inertia.
\end{proof}

\begin{remark}
\label{remark-inertia-is-group-in-spaces}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks. In
Properties of Stacks, Remark \ref{stacks-properties-remark-representable-over}
we have seen that the $2$-category of morphisms
$\mathcal{Z} \to \mathcal{X}$ representable by algebraic spaces
with target $\mathcal{X}$ forms a category.
In this category the inertia stack of $\mathcal{X}/\mathcal{Y}$ is
a {\it group object}. Recall that an object of
$\mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
is just a pair $(x, \alpha)$ where $x$ is an object of $\mathcal{X}$
and $\alpha$ is an automorphism of $x$ in the fibre category of $\mathcal{X}$
that $x$ lives in with $f(\alpha) = \text{id}$. The composition
$$
c :
\mathcal{I}_{\mathcal{X}/\mathcal{Y}}
\times_\mathcal{X} \mathcal{I}_{\mathcal{X}/\mathcal{Y}}
\longrightarrow
\mathcal{I}_{\mathcal{X}/\mathcal{Y}}
$$
is given by the rule on objects
$$
((x, \alpha), (x', \alpha'), \beta) \mapsto
(x, \alpha \circ \beta^{-1} \circ \alpha' \circ \beta)
$$
which makes sense as $\beta : x \to x'$ is an isomorphism in the fibre
category by our definition of fibre products. The neutral element
$e : \mathcal{X} \to \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$ is given by the
functor $x \mapsto (x, \text{id}_x)$. We omit the proof that the
axioms of a group object hold.
\end{remark}

\noindent
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
and let $\mathcal{I}_{\mathcal{X}/\mathcal{Y}}$ be its inertia stack.
Let $T$ be a scheme and let $x$ be an object of $\mathcal{X}$ over $T$.
Set $y = f(x)$. We have seen in the proof of Lemma \ref{lemma-inertia}
that for any scheme $T$ and object $x$ of $\mathcal{X}$ over $T$
there is an exact sequence of sheaves of groups
\begin{equation}
\label{equation-exact-sequence-isom}
0 \to
\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}(x, x) \to
\mathit{Isom}_\mathcal{X}(x, x) \to
\mathit{Isom}_\mathcal{Y}(y, y)
\end{equation}
The group structure on the second and third term is the one
defined in Lemma \ref{lemma-isom-pseudo-torsor-aut} and the
sequence gives a meaning to the first term. Also, there is
a canonical cartesian square
$$
\xymatrix{
\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}(x, x) \ar[d] \ar[r] &
\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \ar[d] \\
T \ar[r]^x & \mathcal{X}
}
$$
In fact, the group structure on $\mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
discussed in Remark \ref{remark-inertia-is-group-in-spaces}
induces the group structure on $\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}(x, x)$.
This allows us to define the sheaf
$\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}(x, x)$
also for morphisms from algebraic spaces to $\mathcal{X}$. We formalize
this in the following definition.

\begin{definition}
\label{definition-isom}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $Z$ be an algebraic space.
\begin{enumerate}
\item Let $x : Z \to \mathcal{X}$ be a morphism. We set
$$
\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}(x, x) =
Z \times_{x, \mathcal{X}} \mathcal{I}_{\mathcal{X}/\mathcal{Y}}
$$
We endow it with the structure of a group algebraic space over $Z$
by pulling back the composition law discussed in
Remark \ref{remark-inertia-is-group-in-spaces}.
We will sometimes refer to $\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}(x, x)$
as the {\it relative sheaf of automorphisms of $x$}.
\item Let $x_1, x_2 : Z \to \mathcal{X}$ be morphisms. Set
$y_i = f \circ x_i$. Let $\alpha : y_1 \to y_2$ be a $2$-morphism.
Then $\alpha$ determines a morphism
$\Delta^\alpha : Z \to Z \times_{y_1, \mathcal{Y}, y_2} Z$ and we set
$$
\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}^\alpha(x_1, x_2) =
(Z \times_{x_1, \mathcal{X}, x_2} Z)
\times_{Z \times_{y_1, \mathcal{Y}, y_2} Z, \Delta^\alpha} Z.
$$
We will sometimes refer to
$\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}^\alpha(x_1, x_2)$
as the {\it relative sheaf of isomorphisms from $x_1$ to $x_2$}.
\end{enumerate}
If $\mathcal{Y} = \Spec(\mathbf{Z})$ or more generally when $\mathcal{Y}$
is an algebraic space, then we use the notation
$\mathit{Isom}_\mathcal{X}(x, x)$ and $\mathit{Isom}_\mathcal{X}(x_1, x_2)$
and we use the terminology {\it sheaf of automorphisms of $x$}
and {\it sheaf of isomorphisms from $x_1$ to $x_2$}.
\end{definition}

\begin{lemma}
\label{lemma-isom-pseudo-torsor-aut-over-space}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $Z$ be an algebraic space and let $x_i : Z \to \mathcal{X}$, $i = 1, 2$
be morphisms. Then
\begin{enumerate}
\item $\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}(x_2, x_2)$
is a group algebraic space over $Z$,
\item there is an exact sequence of groups
$$
0 \to \mathit{Isom}_{\mathcal{X}/\mathcal{Y}}(x_2, x_2)
\to \mathit{Isom}_\mathcal{X}(x_2, x_2)
\to \mathit{Isom}_\mathcal{Y}(f \circ x_2, f \circ x_2)
$$
\item there is a map of algebraic spaces
$
\mathit{Isom}_\mathcal{X}(x_1, x_2)
\to \mathit{Isom}_\mathcal{Y}(f \circ x_1, f \circ x_2)
$
such that for any $2$-morphism $\alpha : f \circ x_1 \to f \circ x_2$
we obtain a cartesian diagram
$$
\xymatrix{
\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}^\alpha(x_1, x_2) \ar[d] \ar[r] &
Z \ar[d]^\alpha \\
\mathit{Isom}_\mathcal{X}(x_1, x_2) \ar[r] &
\mathit{Isom}_\mathcal{Y}(f \circ x_1, f \circ x_2)
}
$$
\item for any $2$-morphism $\alpha : f \circ x_1 \to f \circ x_2$ the
algebraic space $\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}^\alpha(x_1, x_2)$
is a pseudo torsor for $\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}(x_2, x_2)$
over $Z$.
\end{enumerate}
\end{lemma}

\begin{proof}
Part (1) follows from Definition \ref{definition-isom}.
Part (2) comes from the exact sequence (\ref{equation-exact-sequence-isom})
\'etale locally on $Z$. Part (3) can be seen by unwinding the definitions.
Locally on $Z$ in the \'etale topology part (4) reduces to
part (2) of Lemma \ref{lemma-isom-pseudo-torsor-aut}.
\end{proof}

\begin{lemma}
\label{lemma-cartesian-square-inertia}
Let $\pi : \mathcal{X} \to \mathcal{Y}$ and
$f : \mathcal{Y}' \to \mathcal{Y}$ be morphisms of algebraic stacks.
Set $\mathcal{X}' = \mathcal{X} \times_\mathcal{Y} \mathcal{Y}'$.
Then both squares in the diagram
$$
\xymatrix{
\mathcal{I}_{\mathcal{X}'/\mathcal{Y}'} \ar[r]
\ar[d]_{
\text{Categories, Equation}\ (\ref{categories-equation-functorial})
} &
\mathcal{X}' \ar[r]_{\pi'} \ar[d] & \mathcal{Y}' \ar[d]^f \\
\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \ar[r] &
\mathcal{X} \ar[r]^\pi & \mathcal{Y}
}
$$
are fibre product squares.
\end{lemma}

\begin{proof}
The inertia stack $\mathcal{I}_{\mathcal{X}'/\mathcal{Y}'}$ is defined as the
category of pairs $(x', \alpha')$ where $x'$ is an object of $\mathcal{X}'$
and $\alpha'$ is an automorphism of $x'$ with $\pi'(\alpha') = \text{id}$, see
Categories, Section \ref{categories-section-inertia}.
Suppose that $x'$ lies over the scheme $U$ and maps to the object
$x$ of $\mathcal{X}$. By the construction of the $2$-fibre product in
Categories, Lemma \ref{categories-lemma-2-product-categories-over-C}
we see that $x' = (U, x, y', \beta)$ where $y'$ is an object of $\mathcal{Y}'$
over $U$ and $\beta$ is an isomorphism
$\beta : \pi(x) \to f(y')$ in the fibre category of $\mathcal{Y}$ over $U$.
By the very construction of the $2$-fibre product the automorphism $\alpha'$
is a pair $(\alpha, \gamma)$ where $\alpha$ is an automorphism of $x$ over $U$
and $\gamma$ is an automorphism of $y'$ over $U$ such that
$\alpha$ and $\gamma$ are compatible via $\beta$. The condition
$\pi'(\alpha') = \text{id}$ signifies that $\gamma = \text{id}$
whereupon the condition that $\alpha, \beta, \gamma$ are compatible
is exactly the condition $\pi(\alpha) = \text{id}$, i.e., means
exactly that $(x, \alpha)$ is an object of
$\mathcal{I}_{\mathcal{X}/\mathcal{Y}}$.
In this way we see that the left square is a fibre product square
(some details omitted).
\end{proof}

\begin{lemma}
\label{lemma-monomorphism-cartesian-square-inertia}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a monomorphism of algebraic stacks.
Then the diagram
$$
\xymatrix{
\mathcal{I}_\mathcal{X} \ar[r] \ar[d] &
\mathcal{X} \ar[d] \\
\mathcal{I}_\mathcal{Y} \ar[r] &
\mathcal{Y}
}
$$
is a fibre product square.
\end{lemma}

\begin{proof}
This follows immediately from the fact that $f$ is fully faithful (see
Properties of Stacks, Lemma \ref{stacks-properties-lemma-monomorphism})
and the definition of the inertia in
Categories, Section \ref{categories-section-inertia}.
Namely, an object of $\mathcal{I}_\mathcal{X}$ over a scheme $T$ is
the same thing as a pair $(x, \alpha)$ consisting of an object
$x$ of $\mathcal{X}$ over $T$ and a morphism $\alpha : x \to x$ in
the fibre category of $\mathcal{X}$ over $T$. As $f$ is fully faithful
we see that $\alpha$ is the same thing as a morphism
$\beta : f(x) \to f(x)$ in the fibre category of $\mathcal{Y}$ over $T$.
Hence we can think of objects of $\mathcal{I}_\mathcal{X}$ over $T$
as triples $((y, \beta), x, \gamma)$ where $y$ is an object of
$\mathcal{Y}$ over $T$, $\beta : y \to y$ in $\mathcal{Y}_T$ and
$\gamma : y \to f(x)$ is an isomorphism over $T$, i.e., an object
of $\mathcal{I}_\mathcal{Y} \times_\mathcal{Y} \mathcal{X}$ over $T$.
\end{proof}

\begin{lemma}
\label{lemma-presentation-inertia}
Let $\mathcal{X}$ be an algebraic stack. Let $[U/R] \to \mathcal{X}$
be a presentation. Let $G/U$ be the stabilizer group algebraic space
associated to the groupoid $(U, R, s, t, c)$. Then
$$
\xymatrix{
G \ar[d] \ar[r] & U \ar[d] \\
\mathcal{I}_\mathcal{X} \ar[r] & \mathcal{X}
}
$$
is a fibre product diagram.
\end{lemma}

\begin{proof}
Immediate from
Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-2-cartesian-inertia}.
\end{proof}









\section{Higher diagonals}
\label{section-higher-diagonals}

\noindent
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
In this situation it makes sense to consider not only the diagonal
$$
\Delta_f : \mathcal{X} \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}
$$
but also the diagonal of the diagonal, i.e., the morphism
$$
\Delta_{\Delta_f} :
\mathcal{X}
\longrightarrow
\mathcal{X} \times_{(\mathcal{X} \times_\mathcal{Y} \mathcal{X})} \mathcal{X}
$$
Because of this we sometimes use the following terminology. We denote
$\Delta_{f, 0} = f$ the {\it zeroth diagonal},
we denote $\Delta_{f, 1} = \Delta_f$ the {\it first diagonal}, and
we denote $\Delta_{f, 2} = \Delta_{\Delta_f}$ the {\it second diagonal}.
Note that $\Delta_{f, 1}$ is representable by algebraic spaces and locally of
finite type, see
Lemma \ref{lemma-properties-diagonal}.
Hence $\Delta_{f, 2}$ is representable, a monomorphism, locally of finite type,
separated, and locally quasi-finite, see
Lemma \ref{lemma-properties-diagonal-representable}.

\medskip\noindent
We can describe the second diagonal using the relative inertia stack.
Namely, the fibre product
$\mathcal{X}
\times_{(\mathcal{X} \times_\mathcal{Y} \mathcal{X})} \mathcal{X}$
is equivalent to the relative inertia stack
$\mathcal{I}_{\mathcal{X}/\mathcal{Y}}$ by
Categories, Lemma \ref{categories-lemma-inertia-fibred-category}.
Moreover, via this identification the second diagonal becomes the
{\it neutral section}
$$
\Delta_{f, 2} = e : \mathcal{X} \to \mathcal{I}_{\mathcal{X}/\mathcal{Y}}
$$
of the relative inertia stack. By analogy with what happens for
groupoids in algebraic spaces
(Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-diagonal})
we have the following equivalences.

\begin{lemma}
\label{lemma-diagonal-diagonal}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
\begin{enumerate}
\item
The following are equivalent
\begin{enumerate}
\item $\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \to \mathcal{X}$
is separated,
\item $\Delta_{f, 1} = \Delta_f :
\mathcal{X} \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
is separated, and
\item $\Delta_{f, 2} = e :
\mathcal{X} \to \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
is a closed immersion.
\end{enumerate}
\item
The following are equivalent
\begin{enumerate}
\item $\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \to \mathcal{X}$
is quasi-separated,
\item $\Delta_{f, 1} = \Delta_f :
\mathcal{X} \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
is quasi-separated, and
\item $\Delta_{f, 2} = e :
\mathcal{X} \to \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
is a quasi-compact.
\end{enumerate}
\item
The following are equivalent
\begin{enumerate}
\item $\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \to \mathcal{X}$
is locally separated,
\item $\Delta_{f, 1} = \Delta_f :
\mathcal{X} \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
is locally separated, and
\item $\Delta_{f, 2} = e :
\mathcal{X} \to \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
is an immersion.
\end{enumerate}
\item
The following are equivalent
\begin{enumerate}
\item $\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \to \mathcal{X}$
is unramified,
\item $f$ is DM.
\end{enumerate}
\item
The following are equivalent
\begin{enumerate}
\item $\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \to \mathcal{X}$
is locally quasi-finite,
\item $f$ is quasi-DM.
\end{enumerate}
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1), (2), and (3).
Choose an algebraic space $U$ and a surjective smooth morphism
$U \to \mathcal{X}$. Then
$G = U \times_\mathcal{X} \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
is an algebraic space over $U$ (Lemma \ref{lemma-inertia}).
In fact, $G$ is a group algebraic space over $U$
by the group law on relative
inertia constructed in Remark \ref{remark-inertia-is-group-in-spaces}.
Moreover, $G \to \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
is surjective and smooth as a base change of $U \to \mathcal{X}$.
Finally, the base change of
$e : \mathcal{X} \to \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
by $G \to \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
is the identity $U \to G$ of $G/U$.
Thus the equivalence of (a) and (c) follows from
Groupoids in Spaces, Lemma
\ref{spaces-groupoids-lemma-group-scheme-separated}.
Since $\Delta_{f, 2}$ is the diagonal of $\Delta_f$ we have
(b) $\Leftrightarrow$ (c) by definition.

\medskip\noindent
Proof of (4) and (5). Recall that (4)(b) means $\Delta_f$ is
unramified and (5)(b) means that $\Delta_f$ is locally quasi-finite.
Choose a scheme $Z$ and a morphism
$a : Z \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$.
Then $a = (x_1, x_2, \alpha)$ where $x_i : Z \to \mathcal{X}$
and $\alpha : f \circ x_1  \to f \circ x_2$ is a $2$-morphism.
Recall that
$$
\vcenter{
\xymatrix{
\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}^\alpha(x_1, x_2)
\ar[d] \ar[r] &
Z \ar[d] \\
\mathcal{X} \ar[r]^{\Delta_f} &
\mathcal{X} \times_\mathcal{Y} \mathcal{X}
}
}
\quad\text{and}\quad
\vcenter{
\xymatrix{
\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}(x_2, x_2)
\ar[d] \ar[r] &
Z \ar[d]^{x_2} \\
\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \ar[r] &
\mathcal{X}
}
}
$$
are cartesian squares. By Lemma \ref{lemma-isom-pseudo-torsor-aut-over-space}
the
algebraic space $\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}^\alpha(x_1, x_2)$
is a pseudo torsor for $\mathit{Isom}_{\mathcal{X}/\mathcal{Y}}(x_2, x_2)$
over $Z$. Thus the equivalences in (4) and (5) follow from
Groupoids in Spaces, Lemma
\ref{spaces-groupoids-lemma-pseudo-torsor-implications}.
\end{proof}

\begin{lemma}
\label{lemma-second-diagonal}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The following are equivalent:
\begin{enumerate}
\item the morphism $f$ is representable by algebraic spaces,
\item the second diagonal of $f$ is an isomorphism,
\item the group stack $ \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
is trivial over $\mathcal X$, and
\item for a scheme $T$ and a morphism $x : T \to \mathcal{X}$
the kernel of $\mathit{Isom}_\mathcal{X}(x, x) \to
\mathit{Isom}_\mathcal{Y}(f(x), f(x))$ is trivial.
\end{enumerate}
\end{lemma}

\begin{proof}
We first prove the equivalence of (1) and (2).
Namely, $f$ is representable by algebraic spaces if and only if $f$ is
faithful, see
Algebraic Stacks,
Lemma \ref{algebraic-lemma-characterize-representable-by-algebraic-spaces}.
On the other hand, $f$ is faithful if and only if for every object $x$
of $\mathcal{X}$ over a scheme $T$ the functor $f$ induces an injection
$\mathit{Isom}_\mathcal{X}(x, x) \to
\mathit{Isom}_\mathcal{Y}(f(x), f(x))$,
which happens if and only if the kernel $K$ is trivial, which happens if and
only if $e : T \to K$ is an isomorphism for every $x : T \to \mathcal{X}$.
Since $K = T \times_{x, \mathcal{X}} \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
as discussed above, this proves the equivalence of (1) and (2). To prove
the equivalence of (2) and (3), by the discussion above, it suffices to
note that a group stack is trivial if and only if its identity section
is an isomorphism. Finally, the equivalence of (3) and (4) follows
from the definitions: in the proof of Lemma \ref{lemma-inertia}
we have seen that the kernel in (4) corresponds to the fibre product
$T \times_{x, \mathcal{X}} \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$ over $T$.
\end{proof}

\noindent
This lemma leads to the following hierarchy for
morphisms of algebraic stacks.

\begin{lemma}
\label{lemma-hierarchy}
A morphism $f : \mathcal{X} \to \mathcal{Y}$ of algebraic stacks is
\begin{enumerate}
\item a monomorphism if and only if $\Delta_{f, 1}$ is an isomorphism, and
\item representable by algebraic spaces if and only if $\Delta_{f, 1}$
is a monomorphism.
\end{enumerate}
Moreover, the second diagonal $\Delta_{f, 2}$ is always a monomorphism.
\end{lemma}

\begin{proof}
Recall from Properties of Stacks, Lemma
\ref{stacks-properties-lemma-monomorphism}
that a morphism of algebraic stacks is a monomorphism
if and only if its diagonal is an isomorphism of stacks.
Thus Lemma \ref{lemma-second-diagonal}
can be rephrased as saying that a morphism is
representable by algebraic spaces if the diagonal
is a monomorphism. In particular, it shows that condition
(3) of Lemma \ref{lemma-properties-diagonal-representable}
is actually an if and only if, i.e., a morphism of algebraic stacks
is representable by algebraic spaces if and only if
its diagonal is a monomorphism.
\end{proof}

\begin{lemma}
\label{lemma-first-diagonal-separated-second-diagonal-closed}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Then
\begin{enumerate}
\item $\Delta_{f, 1}$ separated $\Leftrightarrow$
$\Delta_{f, 2}$ closed immersion $\Leftrightarrow$
$\Delta_{f, 2}$ proper $\Leftrightarrow$
$\Delta_{f, 2}$ universally closed,
\item $\Delta_{f, 1}$ quasi-separated $\Leftrightarrow$
$\Delta_{f, 2}$ finite type $\Leftrightarrow$ $\Delta_{f, 2}$ quasi-compact,
and
\item $\Delta_{f, 1}$ locally separated $\Leftrightarrow$
$\Delta_{f, 2}$ immersion.
\end{enumerate}
\end{lemma}

\begin{proof}
Follows from
Lemmas \ref{lemma-representable-separated-diagonal-closed},
\ref{lemma-representable-quasi-separated-diagonal-quasi-compact}, and
\ref{lemma-representable-locally-separated-diagonal-immersion}
applied to $\Delta_{f, 1}$.
\end{proof}

\noindent
The following lemma is kind of cute and it may suggest a generalization
of these conditions to higher algebraic stacks.

\begin{lemma}
\label{lemma-definition-separated}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Then
\begin{enumerate}
\item $f$ is separated if and only if $\Delta_{f, 1}$ and $\Delta_{f, 2}$
are universally closed, and
\item $f$ is quasi-separated if and only if $\Delta_{f, 1}$ and $\Delta_{f, 2}$
are quasi-compact.
\item $f$ is quasi-DM if and only if $\Delta_{f, 1}$ and $\Delta_{f, 2}$
are locally quasi-finite.
\item $f$ is DM if and only if $\Delta_{f, 1}$ and $\Delta_{f, 2}$
are unramified.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1). Assume that $\Delta_{f, 2}$ and $\Delta_{f, 1}$ are
universally closed. Then $\Delta_{f, 1}$ is separated and universally
closed by
Lemma \ref{lemma-first-diagonal-separated-second-diagonal-closed}.
By
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-universally-closed-quasi-compact}
and
Algebraic Stacks,
Lemma \ref{algebraic-lemma-representable-transformations-property-implication}
we see that $\Delta_{f, 1}$ is quasi-compact.
Hence it is quasi-compact, separated, universally closed and locally of
finite type (by
Lemma \ref{lemma-properties-diagonal})
so proper. This proves ``$\Leftarrow$'' of (1).
The proof of the implication in the other direction is omitted.

\medskip\noindent
Proof of (2). This follows immediately from
Lemma \ref{lemma-first-diagonal-separated-second-diagonal-closed}.

\medskip\noindent
Proof of (3). This follows from the fact that $\Delta_{f, 2}$ is always locally
quasi-finite by
Lemma \ref{lemma-properties-diagonal-representable}
applied to $\Delta_f = \Delta_{f, 1}$.

\medskip\noindent
Proof of (4). This follows from the fact that $\Delta_{f, 2}$ is always
unramified as
Lemma \ref{lemma-properties-diagonal-representable}
applied to $\Delta_f = \Delta_{f, 1}$ shows that
$\Delta_{f, 2}$ is locally of finite type and a monomorphism.
See
More on Morphisms of Spaces,
Lemma \ref{spaces-more-morphisms-lemma-universally-injective-unramified}.
\end{proof}

\begin{lemma}
\label{lemma-separated-implies-isom}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a separated
(resp.\ quasi-separated, resp.\ quasi-DM, resp.\ DM)
morphism of algebraic stacks. Then
\begin{enumerate}
\item given algebraic spaces $T_i$, $i = 1, 2$ and morphisms
$x_i : T_i \to \mathcal{X}$, with $y_i = f \circ x_i$ the morphism
$$
T_1 \times_{x_1, \mathcal{X}, x_2} T_2 \longrightarrow
T_1 \times_{y_1, \mathcal{Y}, y_2} T_2
$$
is proper (resp.\ quasi-compact and quasi-separated,
resp.\ locally quasi-finite, resp.\ unramified),
\item given an algebraic space $T$ and morphisms
$x_i : T \to \mathcal{X}$, $i = 1, 2$, with $y_i = f \circ x_i$ the morphism
$$
\mathit{Isom}_\mathcal{X}(x_1, x_2) \longrightarrow
\mathit{Isom}_\mathcal{Y}(y_1, y_2)
$$
is proper (resp.\ quasi-compact and quasi-separated,
resp.\ locally quasi-finite, resp.\ unramified).
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1). Observe that the diagram
$$
\xymatrix{
T_1 \times_{x_1, \mathcal{X}, x_2} T_2 \ar[d] \ar[r] &
T_1 \times_{y_1, \mathcal{Y}, y_2} T_2 \ar[d] \\
\mathcal{X} \ar[r] & \mathcal{X} \times_\mathcal{Y} \mathcal{X}
}
$$
is cartesian. Hence this follows from the fact that $f$ is separated
(resp.\ quasi-separated, resp.\ quasi-DM, resp.\ DM)
if and only if the diagonal is proper
(resp.\ quasi-compact and quasi-separated,
resp.\ locally quasi-finite, resp.\ unramified).

\medskip\noindent
Proof of (2). This is true because
$$
\mathit{Isom}_\mathcal{X}(x_1, x_2) =
(T \times_{x_1, \mathcal{X}, x_2} T) \times_{T \times T, \Delta_T} T
$$
hence the morphism in (2) is a base change of the morphism in (1).
\end{proof}








\section{Quasi-compact morphisms}
\label{section-quasi-compact}

\noindent
Let $f$ be a morphism of algebraic stacks which is representable by
algebraic spaces. In
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}
we have defined what it means for $f$ to be quasi-compact.
Here is another characterization.

\begin{lemma}
\label{lemma-characterize-representable-quasi-compact}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
which is representable by algebraic spaces. The following are equivalent:
\begin{enumerate}
\item $f$ is quasi-compact (as in Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}), and
\item for every quasi-compact algebraic stack $\mathcal{Z}$
and any morphism $\mathcal{Z} \to \mathcal{Y}$ the algebraic stack
$\mathcal{Z} \times_\mathcal{Y} \mathcal{X}$ is quasi-compact.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1), and let $\mathcal{Z} \to \mathcal{Y}$
be a morphism of algebraic stacks with $\mathcal{Z}$ quasi-compact. By
Properties of Stacks,
Lemma \ref{stacks-properties-lemma-quasi-compact-stack}
there exists a quasi-compact scheme $U$ and a surjective smooth
morphism $U \to \mathcal{Z}$. Since $f$ is representable by algebraic
spaces and quasi-compact we see by definition that
$U \times_\mathcal{Y} \mathcal{X}$ is an algebraic space, and that
$U \times_\mathcal{Y} \mathcal{X} \to U$ is quasi-compact.
Hence $U \times_Y X$ is a quasi-compact algebraic space.
The morphism
$U \times_\mathcal{Y} \mathcal{X} \to
\mathcal{Z} \times_\mathcal{Y} \mathcal{X}$
is smooth and surjective (as the base change of the smooth
and surjective morphism $U \to \mathcal{Z}$).
Hence $\mathcal{Z} \times_\mathcal{Y} \mathcal{X}$
is quasi-compact by another application of
Properties of Stacks,
Lemma \ref{stacks-properties-lemma-quasi-compact-stack}

\medskip\noindent
Assume (2). Let $Z \to \mathcal{Y}$ be a morphism, where $Z$ is a scheme.
We have to show that the morphism of algebraic spaces
$p : Z \times_\mathcal{Y} \mathcal{X} \to Z$ is quasi-compact.
Let $U \subset Z$ be affine open. Then
$p^{-1}(U) = U \times_\mathcal{Y} \mathcal{Z}$
and the algebraic space $U \times_\mathcal{Y} \mathcal{Z}$
is quasi-compact by assumption (2). Hence $p$ is quasi-compact, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-quasi-compact-local}.
\end{proof}

\noindent
This motivates the following definition.

\begin{definition}
\label{definition-quasi-compact}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $f$ is {\it quasi-compact} if for every quasi-compact
algebraic stack $\mathcal{Z}$ and morphism $\mathcal{Z} \to \mathcal{Y}$
the fibre product $\mathcal{Z} \times_\mathcal{Y} \mathcal{X}$
is quasi-compact.
\end{definition}

\noindent
By
Lemma \ref{lemma-characterize-representable-quasi-compact}
above this agrees with the already existing notion
for morphisms of algebraic stacks representable by algebraic spaces.
In particular this notion agrees with the notions already defined
for morphisms between algebraic stacks and schemes.

\begin{lemma}
\label{lemma-base-change-quasi-compact}
The base change of a quasi-compact morphism of algebraic stacks
by any morphism of algebraic stacks is quasi-compact.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-composition-quasi-compact}
The composition of a pair of quasi-compact morphisms of algebraic stacks
is quasi-compact.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-closed-immersion-quasi-compact}
A closed immersion of algebraic stacks is quasi-compact.
\end{lemma}

\begin{proof}
This follows from the fact that immersions are always representable and
the corresponding fact for closed immersion of algebraic spaces.
\end{proof}

\begin{lemma}
\label{lemma-surjection-from-quasi-compact}
Let
$$
\xymatrix{
\mathcal{X} \ar[rr]_f \ar[rd]_p & &
\mathcal{Y} \ar[dl]^q \\
& \mathcal{Z}
}
$$
be a $2$-commutative diagram of morphisms of algebraic stacks.
If $f$ is surjective and $p$ is quasi-compact, then $q$ is quasi-compact.
\end{lemma}

\begin{proof}
Let $\mathcal{T}$ be a quasi-compact algebraic stack, and let
$\mathcal{T} \to \mathcal{Z}$ be a morphism. By
Properties of Stacks,
Lemma \ref{stacks-properties-lemma-base-change-surjective}
the morphism
$\mathcal{T} \times_\mathcal{Z} \mathcal{X} \to
\mathcal{T} \times_\mathcal{Z} \mathcal{Y}$
is surjective and by assumption
$\mathcal{T} \times_\mathcal{Z} \mathcal{X}$
is quasi-compact. Hence
$\mathcal{T} \times_\mathcal{Z} \mathcal{Y}$
is quasi-compact by
Properties of Stacks, Lemma \ref{stacks-properties-lemma-quasi-compact-stack}.
\end{proof}

\begin{lemma}
\label{lemma-quasi-compact-permanence}
Let $f : \mathcal{X} \to \mathcal{Y}$ and
$g : \mathcal{Y} \to \mathcal{Z}$ be morphisms of algebraic stacks.
If $g \circ f$ is quasi-compact and $g$ is quasi-separated
then $f$ is quasi-compact.
\end{lemma}

\begin{proof}
This is true because $f$ equals the composition
$(1, f) : \mathcal{X} \to \mathcal{X} \times_\mathcal{Z} \mathcal{Y} \to
\mathcal{Y}$.
The first map is quasi-compact by
Lemma \ref{lemma-section-immersion}
because it is a section of the quasi-separated morphism
$\mathcal{X} \times_\mathcal{Z} \mathcal{Y} \to \mathcal{X}$
(a base change of $g$, see
Lemma \ref{lemma-base-change-separated}).
The second map is quasi-compact as it is the base change of $f$, see
Lemma \ref{lemma-base-change-quasi-compact}.
And compositions of quasi-compact
morphisms are quasi-compact, see Lemma \ref{lemma-composition-quasi-compact}.
\end{proof}

\begin{lemma}
\label{lemma-quasi-compact-quasi-separated-permanence}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
\begin{enumerate}
\item If $\mathcal{X}$ is quasi-compact and $\mathcal{Y}$ is
quasi-separated, then $f$ is quasi-compact.
\item If $\mathcal{X}$ is quasi-compact and quasi-separated and $\mathcal{Y}$
is quasi-separated, then $f$ is quasi-compact and quasi-separated.
\item A fibre product of quasi-compact and quasi-separated algebraic stacks
is quasi-compact and quasi-separated.
\end{enumerate}
\end{lemma}

\begin{proof}
Part (1) follows from
Lemma \ref{lemma-quasi-compact-permanence}.
Part (2) follows from (1) and
Lemma \ref{lemma-compose-after-separated}.
For (3) let $\mathcal{X} \to \mathcal{Y}$ and $\mathcal{Z} \to \mathcal{Y}$
be morphisms of quasi-compact and quasi-separated algebraic stacks.
Then $\mathcal{X} \times_\mathcal{Y} \mathcal{Z} \to \mathcal{Z}$
is quasi-compact and quasi-separated as a base change of
$\mathcal{X} \to \mathcal{Y}$ using (2) and
Lemmas \ref{lemma-base-change-quasi-compact} and
\ref{lemma-base-change-separated}.
Hence $\mathcal{X} \times_\mathcal{Y} \mathcal{Z}$
is quasi-compact and quasi-separated as
an algebraic stack quasi-compact and quasi-separated over
$\mathcal{Z}$, see
Lemmas \ref{lemma-separated-over-separated} and
\ref{lemma-composition-quasi-compact}.
\end{proof}

\begin{lemma}
\label{lemma-reach-points-scheme-theoretic-image}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a quasi-compact morphism of
algebraic stacks. Let $y \in |\mathcal{Y}|$ be a point in the closure
of the image of $|f|$. There exists a valuation ring $A$ with
fraction field $K$ and a commutative diagram
$$
\xymatrix{
\Spec(K) \ar[r] \ar[d] & \mathcal{X} \ar[d] \\
\Spec(A) \ar[r] & \mathcal{Y}
}
$$
such that the closed point of $\Spec(A)$ maps to $y$.
\end{lemma}

\begin{proof}
Choose an affine scheme $V$ and a point $v \in V$ and a smooth morphism
$V \to \mathcal{Y}$ sending $v$ to $y$. Consider the base change diagram
$$
\xymatrix{
V \times_\mathcal{Y} \mathcal{X} \ar[r] \ar[d]_g & \mathcal{X} \ar[d]^f \\
V \ar[r] & \mathcal{Y}
}
$$
Recall that $|V \times_\mathcal{Y} \mathcal{X}| \to
|V| \times_{|\mathcal{Y}|} |\mathcal{X}|$ is surjective
(Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian}).
Because $|V| \to |\mathcal{Y}|$ is open
(Properties of Stacks, Lemma \ref{stacks-properties-lemma-topology-points})
we conclude that $v$ is in the closure of the image of $|g|$.
Thus it suffices to prove the lemma for the quasi-compact morphism $g$
(Lemma \ref{lemma-base-change-quasi-compact}) which we do in the next
paragraph.

\medskip\noindent
Assume $\mathcal{Y} = Y$ is an affine scheme. Then $\mathcal{X}$
is quasi-compact as $f$ is quasi-compact
(Definition \ref{definition-quasi-compact}).
Choose an affine scheme $W$ and a surjective smooth morphism
$W \to \mathcal{X}$. Then the image of $|f|$ is the image
of $W \to Y$.
By Morphisms, Lemma \ref{morphisms-lemma-reach-points-scheme-theoretic-image}
we can choose a diagram
$$
\xymatrix{
\Spec(K) \ar[r] \ar[d] & W \ar[d] \ar[r] & \mathcal{X} \ar[d] \\
\Spec(A) \ar[r] & Y \ar[r] & Y
}
$$
such that the closed point of $\Spec(A)$ maps to $y$.
Composing with $W \to \mathcal{X}$ we obtain a solution.
\end{proof}

\begin{lemma}
\label{lemma-check-quasi-compact-covering}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $W \to \mathcal{Y}$ be surjective, flat, and locally of finite
presentation where $W$ is an algebraic space. If the base change
$W \times_\mathcal{Y} \mathcal{X} \to W$ is quasi-compact, then
$f$ is quasi-compact.
\end{lemma}

\begin{proof}
Assume $W \times_\mathcal{Y} \mathcal{X} \to W$ is quasi-compact.
Let $\mathcal{Z} \to \mathcal{Y}$ be a morphism with $\mathcal{Z}$
a quasi-compact algebraic stack. Choose a scheme $U$ and a surjective
smooth morphism
$U \to W \times_\mathcal{Y} \mathcal{Z}$.
Since $U \to \mathcal{Z}$ is flat, surjective, and locally of finite
presentation and $\mathcal{Z}$ is quasi-compact, we can find a
quasi-compact open subscheme $U' \subset U$ such that
$U' \to \mathcal{Z}$ is surjective.
Then
$U' \times_\mathcal{Y} \mathcal{X} =
U' \times_W (W \times_\mathcal{Y} \mathcal{X})$
is quasi-compact by assumption and surjects onto
$\mathcal{Z} \times_\mathcal{Y} \mathcal{X}$.
Hence $\mathcal{Z} \times_\mathcal{Y} \mathcal{X}$
is quasi-compact as desired.
\end{proof}











\section{Noetherian algebraic stacks}
\label{section-noetherian}

\noindent
We have already defined locally Noetherian algebraic stacks in
Properties of Stacks, Section \ref{stacks-properties-section-types-properties}.

\begin{definition}
\label{definition-noetherian}
Let $\mathcal{X}$ be an algebraic stack. We say $\mathcal{X}$ is
{\it Noetherian} if $\mathcal{X}$ is quasi-compact, quasi-separated
and locally Noetherian.
\end{definition}

\noindent
Note that a Noetherian algebraic stack $\mathcal{X}$ is not just quasi-compact
and locally Noetherian, but also quasi-separated. In the language of
Section \ref{section-higher-diagonals}
if we denote $p : \mathcal{X} \to \Spec(\mathbf{Z})$ the
``absolute'' structure morphism (i.e., the structure morphism of
$\mathcal{X}$ viewed as an algebraic stack over $\mathbf{Z}$), then
$$
\mathcal{X}\text{ Noetherian}
\Leftrightarrow
\mathcal{X}\text{ locally Noetherian and }
\Delta_{p, 0}, \Delta_{p, 1}, \Delta_{p, 2}
\text{ quasi-compact}.
$$
This will later mean that an algebraic stack of finite type over a
Noetherian algebraic stack is not automatically Noetherian.

\begin{lemma}
\label{lemma-locally-closed-in-noetherian}
Let $j : \mathcal{X} \to \mathcal{Y}$ be an immersion of algebraic stacks.
\begin{enumerate}
\item If $\mathcal{Y}$ is locally Noetherian, then
$\mathcal{X}$ is locally Noetherian and $j$ is quasi-compact.
\item If $\mathcal{Y}$ is Noetherian, then $\mathcal{X}$ is Noetherian.
\end{enumerate}
\end{lemma}

\begin{proof}
Choose a scheme $V$ and a surjective smooth morphism $V \to \mathcal{Y}$.
Then $U = \mathcal{X} \times_\mathcal{Y} V$ is a scheme and
$V \to U$ is an immersion, see
Properties of Stacks, Definition \ref{stacks-properties-definition-immersion}.
Recall that $\mathcal{Y}$ is locally Noetherian if and only if $V$
is locally Noetherian. In this case $U$ is locally Noetherian too
(Morphisms, Lemmas \ref{morphisms-lemma-immersion-locally-finite-type} and
\ref{morphisms-lemma-finite-type-noetherian}) and $U \to V$ is quasi-compact
(Properties, Lemma \ref{properties-lemma-immersion-into-noetherian}).
This shows that $j$ is quasi-compact
(Lemma \ref{lemma-check-quasi-compact-covering})
and that $\mathcal{X}$ is locally Noetherian.
Finally, if $\mathcal{Y}$ is Noetherian, then we see from the above
that $\mathcal{X}$ is quasi-compact and locally Noetherian.
To finish the proof observe that $j$ is separated and hence
$\mathcal{X}$ is quasi-separated because $\mathcal{Y}$ is so by
Lemma \ref{lemma-separated-over-separated}.
\end{proof}

\begin{lemma}
\label{lemma-Noetherian-topology}
Let $\mathcal{X}$ be an algebraic stack.
\begin{enumerate}
\item If $\mathcal{X}$ is locally Noetherian then $|\mathcal{X}|$
is a locally Noetherian topological space.
\item If $\mathcal{X}$ is quasi-compact and locally Noetherian, then
$|\mathcal{X}|$ is a Noetherian topological space.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume $\mathcal{X}$ is locally Noetherian.
Choose a scheme $U$ and a surjective smooth morphism
$U \to \mathcal{X}$. As $\mathcal{X}$ is locally Noetherian
we see that $U$ is locally Noetherian. By
Properties, Lemma \ref{properties-lemma-Noetherian-topology}
this means that $|U|$ is a locally Noetherian topological space.
Since $|U| \to |\mathcal{X}|$ is open and surjective we conclude that
$|\mathcal{X}|$ is locally Noetherian by
Topology, Lemma \ref{topology-lemma-image-Noetherian}.
This proves (1). If $\mathcal{X}$ is quasi-compact and locally Noetherian,
then $|\mathcal{X}|$ is quasi-compact and locally Noetherian. Hence
$|\mathcal{X}|$ is Noetherian by Topology, Lemma
\ref{topology-lemma-quasi-compact-locally-Noetherian-Noetherian}.
\end{proof}

\begin{lemma}
\label{lemma-locally-Noetherian-quasi-sober}
Let $\mathcal{X}$ be a locally Noetherian algebraic stack.
Then $|\mathcal{X}|$ is quasi-sober (Topology, Definition
\ref{topology-definition-generic-point}).
\end{lemma}

\begin{proof}
We have to prove that every
irreducible closed subset $T \subset |\mathcal{X}|$ has a generic point.
Choose an affine scheme $U$ and a smooth morphism $f : U \to \mathcal{X}$
such that $f^{-1}(T) \subset |U|$ is nonempty. Since $U$ is Noetherian,
the closed subset $f^{-1}(T)$ has finitely many irreducible components
(Topology, Lemma \ref{topology-lemma-Noetherian}).
Say $f^{-1}(T) = Z_1 \cup \ldots \cup Z_n$ is the decomposition into
irreducible components. As $f$ is open, the image of
$f|_{f^{-1}(T)} : f^{-1}(T) \to T$ contains a nonempty open subset of $T$.
Since $T$ is irreducible, this means that $f(f^{-1}(T))$ is dense.
Since $T$ is irreducible, it follows that $f(Z_i)$ is dense for some $i$.
Then if $\xi_i \in Z_i$ is the generic point we see that
$f(\xi_i)$ is a generic point of $T$.
\end{proof}





\section{Affine morphisms}
\label{section-affine}

\noindent
Affine morphisms of algebraic stacks are defined as follows.

\begin{definition}
\label{definition-affine}
A morphism of algebraic stacks is said to be {\it affine}
if it is representable and affine in the sense of
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}.
\end{definition}

\noindent
For us it is a little bit more convenient to think of an affine
morphism of algebraic stacks as a morphism of algebraic stacks which is
representable by algebraic spaces and affine in the sense of
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}.
(Recall that the default for ``representable'' in the Stacks project
is representable by schemes.)
Since this is clearly equivalent to the notion just defined we shall
use this characterization without further mention.
We prove a few simple lemmas about this notion.

\begin{lemma}
\label{lemma-base-change-affine}
Let $\mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $\mathcal{Z} \to \mathcal{Y}$ be an affine morphism of algebraic
stacks. Then $\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{X}$
is an affine morphism of algebraic stacks.
\end{lemma}

\begin{proof}
This follows from the discussion in
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}.
\end{proof}

\begin{lemma}
\label{lemma-composition-affine}
Compositions of affine morphisms of algebraic stacks are affine.
\end{lemma}

\begin{proof}
This follows from the discussion in
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}
and
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-composition-affine}.
\end{proof}

\begin{lemma}
\label{lemma-affine-permanence}
Let
$$
\xymatrix{
\mathcal{X} \ar[rr]_f \ar[rd]_a & & \mathcal{Y} \ar[dl]^b \\
& \mathcal{Z}
}
$$
be a commutative diagram of morphisms of algebraic stacks.
If $a$ is affine and $\Delta_b$ is affine, then
$f$ is affine.
\end{lemma}

\begin{proof}
The base change
$\text{pr}_2 : \mathcal{X} \times_\mathcal{Z} \mathcal{Y} \to \mathcal{Y}$
of $a$ is affine by Lemma \ref{lemma-base-change-affine}. The morphism
$(1, f) : \mathcal{X} \to \mathcal{X} \times_\mathcal{Z} \mathcal{Y}$
is the base change of
$\Delta_b : \mathcal{Y} \to \mathcal{Y} \times_\mathcal{Z} \mathcal{Y}$
by the morphism $\mathcal{X} \times_\mathcal{Z} \mathcal{Y} \to
\mathcal{Y} \times_\mathcal{Z} \mathcal{Y}$ (see material in
Categories, Section \ref{categories-section-2-fibre-products}).
Hence it is affine by
Lemma \ref{lemma-base-change-affine}.
The composition $f = \text{pr}_2 \circ (1, f)$ of affine morphisms is affine by
Lemma \ref{lemma-composition-affine} and the proof is done.
\end{proof}





\section{Integral and finite morphisms}
\label{section-integral}

\noindent
Integral and finite morphisms of algebraic stacks are defined as follows.

\begin{definition}
\label{definition-integral}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
\begin{enumerate}
\item We say $f$ is {\it integral} if $f$ is representable and integral
in the sense of Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}.
\item We say $f$ is {\it finite} if $f$ is representable and finite
in the sense of Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}.
\end{enumerate}
\end{definition}

\noindent
For us it is a little bit more convenient to think of an
integral, resp.\ finite morphism of algebraic stacks as a
morphism of algebraic stacks which is
representable by algebraic spaces and integral, resp.\ finite
in the sense of Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}.
(Recall that the default for ``representable'' in the Stacks project
is representable by schemes.)
Since this is clearly equivalent to the notion just defined we shall
use this characterization without further mention.
We prove a few simple lemmas about this notion.

\begin{lemma}
\label{lemma-base-change-integral}
Let $\mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $\mathcal{Z} \to \mathcal{Y}$ be an integral (or finite)
morphism of algebraic stacks. Then
$\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{X}$
is an integral (or finite) morphism of algebraic stacks.
\end{lemma}

\begin{proof}
This follows from the discussion in
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}.
\end{proof}

\begin{lemma}
\label{lemma-composition-integral}
Compositions of integral, resp.\ finite morphisms of algebraic stacks
are integral, resp.\ finite.
\end{lemma}

\begin{proof}
This follows from the discussion in
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}
and
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-composition-integral}.
\end{proof}




\section{Open morphisms}
\label{section-open}

\noindent
Let $f$ be a morphism of algebraic stacks which is representable by
algebraic spaces. In
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}
we have defined what it means for $f$ to be universally open.
Here is another characterization.

\begin{lemma}
\label{lemma-characterize-representable-universally-open}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of
algebraic stacks which is representable by algebraic spaces.
The following are equivalent
\begin{enumerate}
\item $f$ is universally open (as in Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}), and
\item for every morphism of algebraic stacks $\mathcal{Z} \to \mathcal{Y}$
the morphism of topological spaces
$|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \to |\mathcal{Z}|$ is open.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1), and let $\mathcal{Z} \to \mathcal{Y}$ be as in (2).
Choose a scheme $V$ and a surjective smooth morphism $V \to \mathcal{Z}$.
By assumption the morphism $V \times_\mathcal{Y} \mathcal{X} \to V$
of algebraic spaces is universally open, in particular the map
$|V \times_\mathcal{Y} \mathcal{X}| \to |V|$ is open. By
Properties of Stacks, Section \ref{stacks-properties-section-points}
in the commutative diagram
$$
\xymatrix{
|V \times_\mathcal{Y} \mathcal{X}| \ar[r] \ar[d] &
|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \ar[d] \\
|V| \ar[r] & |\mathcal{Z}|
}
$$
the horizontal arrows are open and surjective, and moreover
$$
|V \times_\mathcal{Y} \mathcal{X}| \longrightarrow
|V| \times_{|\mathcal{Z}|} |\mathcal{Z} \times_\mathcal{Y} \mathcal{X}|
$$
is surjective. Hence as the left vertical arrow is open it follows that
the right vertical arrow is open. This proves (2).
The implication (2) $\Rightarrow$ (1) follows from the definitions.
\end{proof}

\noindent
Thus we may use the following natural definition.

\begin{definition}
\label{definition-open}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
\begin{enumerate}
\item We say $f$ is {\it open} if the map of topological
spaces $|\mathcal{X}| \to |\mathcal{Y}|$ is open.
\item We say $f$ is {\it universally open} if for every morphism
of algebraic stacks $\mathcal{Z} \to \mathcal{Y}$
the morphism of topological spaces
$$
|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \to |\mathcal{Z}|
$$
is open, i.e., the base change
$\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$ is open.
\end{enumerate}
\end{definition}

\begin{lemma}
\label{lemma-base-change-universally-open}
The base change of a universally open morphism of algebraic stacks
by any morphism of algebraic stacks is universally open.
\end{lemma}

\begin{proof}
This is immediate from the definition.
\end{proof}

\begin{lemma}
\label{lemma-composition-universally-open}
The composition of a pair of (universally) open morphisms of
algebraic stacks is (universally) open.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}







\section{Submersive morphisms}
\label{section-submersive}

\noindent
Let $f$ be a morphism of algebraic stacks which is representable by
algebraic spaces. In
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}
we have defined what it means for $f$ to be universally submersive.
Here is another characterization.

\begin{lemma}
\label{lemma-characterize-representable-universally-submersive}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of
algebraic stacks which is representable by algebraic spaces.
The following are equivalent
\begin{enumerate}
\item $f$ is universally submersive (as in Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}), and
\item for every morphism of algebraic stacks $\mathcal{Z} \to \mathcal{Y}$
the morphism of topological spaces
$|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \to |\mathcal{Z}|$ is submersive.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1), and let $\mathcal{Z} \to \mathcal{Y}$ be as in (2).
Choose a scheme $V$ and a surjective smooth morphism $V \to \mathcal{Z}$.
By assumption the morphism $V \times_\mathcal{Y} \mathcal{X} \to V$
of algebraic spaces is universally submersive, in particular the map
$|V \times_\mathcal{Y} \mathcal{X}| \to |V|$ is submersive. By
Properties of Stacks, Section \ref{stacks-properties-section-points}
in the commutative diagram
$$
\xymatrix{
|V \times_\mathcal{Y} \mathcal{X}| \ar[r] \ar[d] &
|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \ar[d] \\
|V| \ar[r] & |\mathcal{Z}|
}
$$
the horizontal arrows are open and surjective, and moreover
$$
|V \times_\mathcal{Y} \mathcal{X}| \longrightarrow
|V| \times_{|\mathcal{Z}|} |\mathcal{Z} \times_\mathcal{Y} \mathcal{X}|
$$
is surjective. Hence as the left vertical arrow is submersive it follows that
the right vertical arrow is submersive. This proves (2).
The implication (2) $\Rightarrow$ (1) follows from the definitions.
\end{proof}

\noindent
Thus we may use the following natural definition.

\begin{definition}
\label{definition-submersive}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
\begin{enumerate}
\item We say $f$ is {\it submersive}\footnote{This is very different
from the notion of a submersion of differential manifolds.}
if the continuous map $|\mathcal{X}| \to |\mathcal{Y}|$ is submersive, see
Topology, Definition \ref{topology-definition-submersive}.
\item We say $f$ is {\it universally submersive} if for every
morphism of algebraic stacks $\mathcal{Y}' \to \mathcal{Y}$
the base change $\mathcal{Y}' \times_\mathcal{Y} \mathcal{X} \to \mathcal{Y}'$
is submersive.
\end{enumerate}
\end{definition}

\noindent
We note that a submersive morphism is in particular surjective.

\begin{lemma}
\label{lemma-base-change-universally-submersive}
The base change of a universally submersive morphism of algebraic stacks
by any morphism of algebraic stacks is universally submersive.
\end{lemma}

\begin{proof}
This is immediate from the definition.
\end{proof}

\begin{lemma}
\label{lemma-composition-universally-submersive}
The composition of a pair of (universally) submersive morphisms of
algebraic stacks is (universally) submersive.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}












\section{Universally closed morphisms}
\label{section-universally-closed}

\noindent
Let $f$ be a morphism of algebraic stacks which is representable by
algebraic spaces. In
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}
we have defined what it means for $f$ to be universally closed.
Here is another characterization.

\begin{lemma}
\label{lemma-characterize-representable-universally-closed}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of
algebraic stacks which is representable by algebraic spaces.
The following are equivalent
\begin{enumerate}
\item $f$ is universally closed (as in Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}), and
\item for every morphism of algebraic stacks $\mathcal{Z} \to \mathcal{Y}$
the morphism of topological spaces
$|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \to |\mathcal{Z}|$ is closed.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1), and let $\mathcal{Z} \to \mathcal{Y}$ be as in (2).
Choose a scheme $V$ and a surjective smooth morphism $V \to \mathcal{Z}$.
By assumption the morphism $V \times_\mathcal{Y} \mathcal{X} \to V$
of algebraic spaces is universally closed, in particular the map
$|V \times_\mathcal{Y} \mathcal{X}| \to |V|$ is closed. By
Properties of Stacks, Section \ref{stacks-properties-section-points}
in the commutative diagram
$$
\xymatrix{
|V \times_\mathcal{Y} \mathcal{X}| \ar[r] \ar[d] &
|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \ar[d] \\
|V| \ar[r] & |\mathcal{Z}|
}
$$
the horizontal arrows are open and surjective, and moreover
$$
|V \times_\mathcal{Y} \mathcal{X}| \longrightarrow
|V| \times_{|\mathcal{Z}|} |\mathcal{Z} \times_\mathcal{Y} \mathcal{X}|
$$
is surjective. Hence as the left vertical arrow is closed it follows that
the right vertical arrow is closed. This proves (2).
The implication (2) $\Rightarrow$ (1) follows from the definitions.
\end{proof}

\noindent
Thus we may use the following natural definition.

\begin{definition}
\label{definition-closed}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
\begin{enumerate}
\item We say $f$ is {\it closed} if the map of topological
spaces $|\mathcal{X}| \to |\mathcal{Y}|$ is closed.
\item We say $f$ is {\it universally closed} if for every morphism
of algebraic stacks $\mathcal{Z} \to \mathcal{Y}$
the morphism of topological spaces
$$
|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \to |\mathcal{Z}|
$$
is closed, i.e., the base change
$\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$ is closed.
\end{enumerate}
\end{definition}

\begin{lemma}
\label{lemma-base-change-universally-closed}
The base change of a universally closed morphism of algebraic stacks
by any morphism of algebraic stacks is universally closed.
\end{lemma}

\begin{proof}
This is immediate from the definition.
\end{proof}

\begin{lemma}
\label{lemma-composition-universally-closed}
The composition of a pair of (universally) closed morphisms of
algebraic stacks is (universally) closed.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-universally-closed-local}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The following are equivalent
\begin{enumerate}
\item $f$ is universally closed,
\item for every scheme $Z$ and every morphism $Z \to \mathcal{Y}$
the projection $|Z \times_\mathcal{Y} \mathcal{X}| \to |Z|$
is closed,
\item for every affine scheme $Z$ and every morphism $Z \to \mathcal{Y}$
the projection $|Z \times_\mathcal{Y} \mathcal{X}| \to |Z|$ is
closed, and
\item there exists an algebraic space $V$ and a surjective smooth morphism
$V \to \mathcal{Y}$ such that $V \times_\mathcal{Y} \mathcal{X} \to V$
is a universally closed morphism of algebraic stacks.
\end{enumerate}
\end{lemma}

\begin{proof}
We omit the proof that (1) implies (2), and that (2) implies (3).

\medskip\noindent
Assume (3). Choose a surjective smooth morphism $V \to \mathcal{Y}$.
We are going to show that $V \times_\mathcal{Y} \mathcal{X} \to V$
is a universally closed morphism of algebraic stacks.
Let $\mathcal{Z} \to V$ be a morphism from an algebraic stack to $V$.
Let $W \to \mathcal{Z}$ be a surjective smooth morphism where
$W = \coprod W_i$ is a disjoint union of affine schemes.
Then we have the following commutative diagram
$$
\xymatrix{
\coprod_i |W_i \times_\mathcal{Y} \mathcal{X}| \ar@{=}[r] \ar[d] &
|W \times_\mathcal{Y} \mathcal{X}| \ar[r] \ar[d] &
|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \ar[d] \ar@{=}[r] &
|\mathcal{Z} \times_V (V \times_\mathcal{Y} \mathcal{X})| \ar[ld] \\
\coprod |W_i| \ar@{=}[r] &
|W| \ar[r] &
|\mathcal{Z}|
}
$$
We have to show the south-east arrow is closed. The middle horizontal
arrows are surjective and open
(Properties of Stacks, Lemma \ref{stacks-properties-lemma-topology-points}).
By assumption (3), and the fact that
$W_i$ is affine we see that the left vertical arrows are closed. Hence
it follows that the right vertical arrow is closed.

\medskip\noindent
Assume (4). We will show that $f$ is universally closed.
Let $\mathcal{Z} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Consider the diagram
$$
\xymatrix{
|(V \times_\mathcal{Y} \mathcal{Z})
\times_V (V \times_\mathcal{Y} \mathcal{X})| \ar@{=}[r] \ar[rd] &
|V \times_\mathcal{Y} \mathcal{X}| \ar[r] \ar[d] &
|Z \times_\mathcal{Y} \mathcal{X}| \ar[d] \\
 &
|V \times_\mathcal{Y} \mathcal{Z}| \ar[r] &
|\mathcal{Z}|
}
$$
The south-west arrow is closed by assumption. The horizontal arrows are
surjective and open because the corresponding morphisms of
algebraic stacks are surjective and smooth (see reference above).
It follows that the right vertical arrow is closed.
\end{proof}










\section{Universally injective morphisms}
\label{section-universally-injective}

\noindent
Let $f$ be a morphism of algebraic stacks which is representable by
algebraic spaces. In
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}
we have defined what it means for $f$ to be universally injective.
Here is another characterization.

\begin{lemma}
\label{lemma-characterize-representable-universally-injective}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of
algebraic stacks which is representable by algebraic spaces.
The following are equivalent
\begin{enumerate}
\item $f$ is universally injective (as in Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}), and
\item for every morphism of algebraic stacks $\mathcal{Z} \to \mathcal{Y}$
the map $|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \to |\mathcal{Z}|$
is injective.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1), and let $\mathcal{Z} \to \mathcal{Y}$ be as in (2).
Choose a scheme $V$ and a surjective smooth morphism $V \to \mathcal{Z}$.
By assumption the morphism $V \times_\mathcal{Y} \mathcal{X} \to V$
of algebraic spaces is universally injective, in particular the map
$|V \times_\mathcal{Y} \mathcal{X}| \to |V|$ is injective. By
Properties of Stacks, Section \ref{stacks-properties-section-points}
in the commutative diagram
$$
\xymatrix{
|V \times_\mathcal{Y} \mathcal{X}| \ar[r] \ar[d] &
|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \ar[d] \\
|V| \ar[r] & |\mathcal{Z}|
}
$$
the horizontal arrows are open and surjective, and moreover
$$
|V \times_\mathcal{Y} \mathcal{X}| \longrightarrow
|V| \times_{|\mathcal{Z}|} |\mathcal{Z} \times_\mathcal{Y} \mathcal{X}|
$$
is surjective. Hence as the left vertical arrow is injective it follows that
the right vertical arrow is injective. This proves (2).
The implication (2) $\Rightarrow$ (1) follows from the definitions.
\end{proof}

\noindent
Thus we may use the following natural definition.

\begin{definition}
\label{definition-universally-injective}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $f$ is {\it universally injective} if for every morphism
of algebraic stacks $\mathcal{Z} \to \mathcal{Y}$ the map
$$
|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \to |\mathcal{Z}|
$$
is injective.
\end{definition}

\begin{lemma}
\label{lemma-base-change-universally-injective}
The base change of a universally injective morphism of algebraic stacks
by any morphism of algebraic stacks is universally injective.
\end{lemma}

\begin{proof}
This is immediate from the definition.
\end{proof}

\begin{lemma}
\label{lemma-composition-universally-injective}
The composition of a pair of universally injective morphisms of
algebraic stacks is universally injective.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-universally-injective}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The following are equivalent
\begin{enumerate}
\item $f$ is universally injective,
\item $\Delta : \mathcal{X} \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
is surjective, and
\item for an algebraically closed field, for
$x_1, x_2 : \Spec(k) \to \mathcal{X}$, and for a $2$-arrow
$\beta : f \circ x_1 \to f \circ x_2$ there is a
$2$-arrow $\alpha : x_1 \to x_2$ with
$\beta = \text{id}_f \star \alpha$.
\end{enumerate}
\end{lemma}

\begin{proof}
(1) $\Rightarrow$ (2). If $f$ is universally injective, then the
first projection
$|\mathcal{X} \times_\mathcal{Y} \mathcal{X}| \to |\mathcal{X}|$
is injective, which implies that $|\Delta|$ is surjective.

\medskip\noindent
(2) $\Rightarrow$ (1). Assume $\Delta$ is surjective. Then any base change
of $\Delta$ is surjective (see Properties of Stacks, Section
\ref{stacks-properties-section-surjective}).
Since the diagonal of a base change
of $f$ is a base change of $\Delta$, we see that it suffices
to show that $|\mathcal{X}| \to |\mathcal{Y}|$ is injective.
If not, then by Properties of Stacks, Lemma
\ref{stacks-properties-lemma-points-cartesian}
we find that the first projection
$|\mathcal{X} \times_\mathcal{Y} \mathcal{X}| \to |\mathcal{X}|$
is not injective. Of course this means that $|\Delta|$ is not
surjective.

\medskip\noindent
(3) $\Rightarrow$ (2). Let
$t \in |\mathcal{X} \times_\mathcal{Y} \mathcal{X}|$.
Then we can represent $t$ by a morphism
$t : \Spec(k) \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
with $k$ an algebraically closed field.
By our construction of $2$-fibre products we can represent
$t$ by $(x_1, x_2, \beta)$ where $x_1, x_2 : \Spec(k) \to \mathcal{X}$
and $\beta : f \circ x_1 \to f \circ x_2$ is a $2$-morphism.
Then (3) implies that there is a $2$-morphism
$\alpha : x_1 \to x_2$ mapping to $\beta$.
This exactly means that $\Delta(x_1) = (x_1, x_1, \text{id})$
is isomorphic to $t$. Hence (2) holds.

\medskip\noindent
(2) $\Rightarrow$ (3). Let $x_1, x_2 : \Spec(k) \to \mathcal{X}$
be morphisms with $k$ an algebraically closed field. Let
$\beta : f \circ x_1 \to f \circ x_2$ be a $2$-morphism.
As in the previous paragraph, we obtain a morphism
$t = (x_1, x_2, \beta) :
\Spec(k) \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$.
By Lemma \ref{lemma-properties-diagonal}
$$
T = \mathcal{X}
\times_{\Delta, \mathcal{X} \times_\mathcal{Y} \mathcal{X}, t} \Spec(k)
$$
is an algebraic space locally of finite type over $\Spec(k)$.
Condition (2) implies that $T$ is nonempty. Then since $k$ is
algebraically closed, there is a $k$-point in $T$.
Unwinding the definitions this means there is a morphism
$\alpha : x_1 \to x_2$ in $\Mor(\Spec(k), \mathcal{X})$
such that $\beta = \text{id}_f \star \alpha$.
\end{proof}

\begin{lemma}
\label{lemma-universally-injective-point}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a universally injective
morphism of algebraic stacks. Let $y : \Spec(k) \to \mathcal{Y}$
be a morphism where $k$ is an algebraically closed field.
If $y$ is in the image of $|\mathcal{X}| \to |\mathcal{Y}|$,
then there is a morphism $x : \Spec(k) \to \mathcal{X}$
with $y = f \circ x$.
\end{lemma}

\begin{proof}
We first remark this lemma is not a triviality, because the assumption that
$y$ is in the image of $|f|$ means only that we can lift
$y$ to a morphism into $\mathcal{X}$ after possibly replacing
$k$ by an extension field. To prove the lemma we may base change
$f$ by $y$, hence we may assume we have a nonempty algebraic stack
$\mathcal{X}$ and a universally injective morphism
$\mathcal{X} \to \Spec(k)$ and we want to find a $k$-valued point
of $\mathcal{X}$. We may replace $\mathcal{X}$ by its reduction.
We may choose a field $k'$ and a surjective, flat, locally finite type morphism
$\Spec(k') \to \mathcal{X}$, see
Properties of Stacks, Lemma \ref{stacks-properties-lemma-unique-point}.
Since $\mathcal{X} \to \Spec(k)$ is universally injective, we find that
$$
\Spec(k') \times_\mathcal{X} \Spec(k') \to \Spec(k' \otimes_k k')
$$
is surjective as the base change of the surjective morphism
$\Delta : \mathcal{X} \to \mathcal{X} \times_{\Spec(k)} \mathcal{X}$
(Lemma \ref{lemma-universally-injective}).
Since $k$ is algebraically closed $k' \otimes_k k'$ is a domain
(Algebra, Lemma
\ref{algebra-lemma-geometrically-integral-any-integral-base-change}).
Let $\xi \in \Spec(k') \times_\mathcal{X} \Spec(k')$
be a point mapping to the generic point of $\Spec(k' \otimes_k k')$.
Let $U$ be the reduced induced closed subscheme structure on
the connected component of $\Spec(k') \times_\mathcal{X} \Spec(k')$
containing $\xi$. Then the two projections $U \to \Spec(k')$
are locally of finite type, as this was true for the projections
$\Spec(k') \times_\mathcal{X} \Spec(k') \to \Spec(k')$
as base changes of the morphism $\Spec(k') \to \mathcal{X}$.
Applying
Varieties, Proposition \ref{varieties-proposition-unique-base-field}
we find that the integral closures of the two images
of $k'$ in $\Gamma(U, \mathcal{O}_U)$ are equal.
Looking in $\kappa(\xi)$ means that any element of the form
$\lambda \otimes 1$ is algebraically dependend on
the subfield
$$
1 \otimes k' \subset 
(\text{fraction field of }k' \otimes_k k') \subset
\kappa(\xi).
$$
Since $k$ is algebraically closed, this is only possible
if $k' = k$ and the proof is complete.
\end{proof}

\begin{lemma}
\label{lemma-universally-injective-local}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The following are equivalent:
\begin{enumerate}
\item $f$ is universally injective,
\item for every affine scheme $Z$ and any morphism
$Z \to \mathcal{Y}$ the morphism $Z \times_\mathcal{Y} \mathcal{X} \to Z$
is universally injective, and
\item add more here.
\end{enumerate}
\end{lemma}

\begin{proof}
The implication (1) $\Rightarrow$ (2) is immediate.
Assume (2) holds. We will show that
$\Delta_f : \mathcal{X} \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
is surjective, which implies (1) by Lemma \ref{lemma-universally-injective}.
Consider an affine scheme $V$ and a smooth morphism
$V \to \mathcal{Y}$. Since
$g : V \times_\mathcal{Y} \mathcal{X} \to V$
is universally injective by (2), we see that
$\Delta_g$ is surjective.
However, $\Delta_g$ is the base change of $\Delta_f$
by the smooth morphism $V \to \mathcal{Y}$.
Since the collection of these morphisms $V \to \mathcal{Y}$
are jointly surjective, we conclude $\Delta_f$ is surjective.
\end{proof}

\begin{lemma}
\label{lemma-check-universally-injective-covering}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $W \to \mathcal{Y}$ be surjective, flat, and locally of finite
presentation where $W$ is an algebraic space. If the base change
$W \times_\mathcal{Y} \mathcal{X} \to W$ is universally injective,
then $f$ is universally injective.
\end{lemma}

\begin{proof}
Observe that the diagonal $\Delta_g$ of the morphism
$g : W \times_\mathcal{Y} \mathcal{X} \to W$
is the base change of $\Delta_f$ by $W \to \mathcal{Y}$.
Hence if $\Delta_g$ is surjective, then so is $\Delta_f$
by Properties of Stacks, Lemma
\ref{stacks-properties-lemma-check-property-covering}.
Thus the lemma follows from the characterization (2)
in Lemma \ref{lemma-universally-injective}.
\end{proof}








\section{Universal homeomorphisms}
\label{section-universal-homeomorphisms}

\noindent
Let $f$ be a morphism of algebraic stacks which is representable by
algebraic spaces. In
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}
we have defined what it means for $f$ to be a universal homeomorphism.
Here is another characterization.

\begin{lemma}
\label{lemma-characterize-representable-universal-homeomorphism}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of
algebraic stacks which is representable by algebraic spaces.
The following are equivalent
\begin{enumerate}
\item $f$ is a universal homeomorphism (Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}), and
\item for every morphism of algebraic stacks $\mathcal{Z} \to \mathcal{Y}$
the map of topological spaces
$|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \to |\mathcal{Z}|$ is
a homeomorphism.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1), and let $\mathcal{Z} \to \mathcal{Y}$ be as in (2).
Choose a scheme $V$ and a surjective smooth morphism $V \to \mathcal{Z}$.
By assumption the morphism $V \times_\mathcal{Y} \mathcal{X} \to V$
of algebraic spaces is a universal homeomorphism, in particular the map
$|V \times_\mathcal{Y} \mathcal{X}| \to |V|$ is a homeomorphism. By
Properties of Stacks, Section \ref{stacks-properties-section-points}
in the commutative diagram
$$
\xymatrix{
|V \times_\mathcal{Y} \mathcal{X}| \ar[r] \ar[d] &
|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \ar[d] \\
|V| \ar[r] & |\mathcal{Z}|
}
$$
the horizontal arrows are open and surjective, and moreover
$$
|V \times_\mathcal{Y} \mathcal{X}| \longrightarrow
|V| \times_{|\mathcal{Z}|} |\mathcal{Z} \times_\mathcal{Y} \mathcal{X}|
$$
is surjective. Hence as the left vertical arrow is a homeomorphism
it follows that the right vertical arrow is a homeomorphism. This proves (2).
The implication (2) $\Rightarrow$ (1) follows from the definitions.
\end{proof}

\noindent
Thus we may use the following natural definition.

\begin{definition}
\label{definition-universal-homeomorphism}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $f$ is a {\it universal homeomorphism} if for every morphism
of algebraic stacks $\mathcal{Z} \to \mathcal{Y}$
the map of topological spaces
$$
|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \to |\mathcal{Z}|
$$
is a homeomorphism.
\end{definition}

\begin{lemma}
\label{lemma-base-change-universal-homeomorphism}
The base change of a universal homeomorphism of algebraic stacks
by any morphism of algebraic stacks is a universal homeomorphism.
\end{lemma}

\begin{proof}
This is immediate from the definition.
\end{proof}

\begin{lemma}
\label{lemma-composition-universal-homeomorphism}
The composition of a pair of universal homeomorphisms of
algebraic stacks is a universal homeomorphism.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-check-universal-homeomorphism-covering}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $W \to \mathcal{Y}$ be surjective, flat, and locally of finite
presentation where $W$ is an algebraic space. If the base change
$W \times_\mathcal{Y} \mathcal{X} \to W$ is a universal homeomorphism,
then $f$ is a universal homeomorphism.
\end{lemma}

\begin{proof}
Assume $g : W \times_\mathcal{Y} \mathcal{X} \to W$ is a universal
homeomorphism. Then $g$ is universally injective, hence $f$ is
universally injective by
Lemma \ref{lemma-check-universally-injective-covering}.
On the other hand, let $\mathcal{Z} \to \mathcal{Y}$
be a morphism with $\mathcal{Z}$ an algebraic stack.
Choose a scheme $U$ and a surjective
smooth morphism $U \to W \times_\mathcal{Y} \mathcal{Z}$.
Consider the diagram
$$
\xymatrix{
W \times_\mathcal{Y} \mathcal{X} \ar[d]^g &
U \times_\mathcal{Y} \mathcal{X} \ar[d] \ar[l] \ar[r] &
\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \ar[d] \\
W &
U \ar[l] \ar[r] &
\mathcal{Z}
}
$$
The middle vertical arrow induces a homeomorphism
on topological space by assumption on $g$.
The morphism $U \to \mathcal{Z}$ and
$U \times_\mathcal{Y} \mathcal{X} \to
\mathcal{Z} \times_\mathcal{Y} \mathcal{X}$
are surjective, flat, and locally of finite presentation
hence induce open maps on topological spaces.
We conclude that
$|\mathcal{Z} \times_\mathcal{Y} \mathcal{X}| \to |\mathcal{Z}|$
is open. Surjectivity is easy to prove; we omit the proof.
\end{proof}










\section{Types of morphisms smooth local on source-and-target}
\label{section-local-source-target}

\noindent
Given a property of morphisms of algebraic spaces which is
{\it smooth local on the source-and-target}, see
Descent on Spaces,
Definition \ref{spaces-descent-definition-local-source-target}
we may use it to define a corresponding
property of morphisms of algebraic stacks, namely by imposing either of
the equivalent conditions of the lemma below.

\begin{lemma}
\label{lemma-local-source-target}
Let $\mathcal{P}$ be a property of morphisms of algebraic spaces
which is smooth local on the source-and-target.
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Consider commutative diagrams
$$
\xymatrix{
U \ar[d]_a \ar[r]_h & V \ar[d]^b \\
\mathcal{X} \ar[r]^f & \mathcal{Y}
}
$$
where $U$ and $V$ are algebraic spaces and the vertical arrows are smooth.
The following are equivalent
\begin{enumerate}
\item for any diagram as above such that in addition
$U \to \mathcal{X} \times_\mathcal{Y} V$ is smooth
the morphism $h$ has property $\mathcal{P}$, and
\item for some diagram as above with $a : U \to \mathcal{X}$ surjective
the morphism $h$ has property $\mathcal{P}$.
\end{enumerate}
If $\mathcal{X}$ and $\mathcal{Y}$ are representable by algebraic spaces,
then this is also equivalent to $f$ (as a morphism of algebraic spaces)
having property $\mathcal{P}$. If $\mathcal{P}$ is also preserved under
any base change, and fppf local on the base, then for morphisms $f$
which are representable by algebraic spaces this
is also equivalent to $f$ having property $\mathcal{P}$ in the sense
of
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}.
\end{lemma}

\begin{proof}
Let us prove the implication (1) $\Rightarrow$ (2). Pick an algebraic
space $V$ and a surjective and smooth morphism $V \to \mathcal{Y}$.
Pick an algebraic space $U$ and a surjective and smooth morphism
$U \to \mathcal{X} \times_\mathcal{Y} V$. Note that $U \to \mathcal{X}$
is surjective and smooth as well, as a composition of the base change
$\mathcal{X} \times_\mathcal{Y} V \to \mathcal{X}$ and the chosen
map $U \to \mathcal{X} \times_\mathcal{Y} V$. Hence we obtain a
diagram as in (1). Thus if (1) holds, then $h : U \to V$ has property
$\mathcal{P}$, which means that (2) holds as $U \to \mathcal{X}$ is surjective.

\medskip\noindent
Conversely, assume (2) holds and let $U, V, a, b, h$ be as in (2).
Next, let $U', V', a', b', h'$ be any diagram as in (1).
Picture
$$
\xymatrix{
U \ar[d] \ar[r]_h & V \ar[d] \\
\mathcal{X} \ar[r]^f & \mathcal{Y}
}
\quad\quad
\xymatrix{
U' \ar[d] \ar[r]_{h'} & V' \ar[d] \\
\mathcal{X} \ar[r]^f & \mathcal{Y}
}
$$
To show that (2) implies (1) we have to prove that $h'$ has $\mathcal{P}$.
To do this consider the commutative diagram
$$
\xymatrix{
U \ar[dd]^h &
U \times_\mathcal{X} U' \ar[d] \ar[l] \ar@/^6ex/[dd]^{(h, h')} \ar[r] &
U' \ar[dd]^{h'} \\
& U \times_\mathcal{Y} V' \ar[lu] \ar[d] & \\
V &
V \times_\mathcal{Y} V' \ar[l] \ar[r] &
V'
}
$$
of algebraic spaces. Note that the horizontal arrows are
smooth as base changes of the smooth morphisms
$V \to \mathcal{Y}$, $V' \to \mathcal{Y}$, $U \to \mathcal{X}$, and
$U' \to \mathcal{X}$. Note that
$$
\xymatrix{
U \times_\mathcal{X} U' \ar[d] \ar[r] & U' \ar[d] \\
U \times_\mathcal{Y} V' \ar[r] & \mathcal{X} \times_\mathcal{Y} V'
}
$$
is cartesian, hence the left vertical arrow is smooth as
$U', V', a', b', h'$ is as in (1).
Since $\mathcal{P}$ is smooth local on the target by
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-local-source-target-implies} part (2)
we see
that the base change $U \times_\mathcal{Y} V' \to V \times_\mathcal{Y} V'$
has $\mathcal{P}$. Since $\mathcal{P}$ is smooth local on the source by
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-local-source-target-implies} part (1)
we can precompose by the smooth morphism
$U \times_\mathcal{X} U' \to U \times_\mathcal{Y} V'$ and
conclude $(h, h')$ has $\mathcal{P}$.
Since $V \times_\mathcal{Y} V' \to V'$ is smooth we conclude
$U \times_\mathcal{X} U' \to V'$ has $\mathcal{P}$ by
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-local-source-target-implies} part (3).
Finally, since $U \times_X U' \to U'$
is surjective and smooth and $\mathcal{P}$ is smooth local
on the source (same lemma) we conclude
that $h'$ has $\mathcal{P}$. This finishes the proof of the equivalence
of (1) and (2).

\medskip\noindent
If $\mathcal{X}$ and $\mathcal{Y}$ are representable, then
Descent on Spaces,
Lemma \ref{spaces-descent-lemma-local-source-target-characterize}
applies which shows that (1) and (2) are equivalent to $f$ having
$\mathcal{P}$.

\medskip\noindent
Finally, suppose $f$ is representable, and $U, V, a, b, h$ are
as in part (2) of the lemma, and that $\mathcal{P}$ is preserved under
arbitrary base change. We have to show that for any scheme
$Z$ and morphism $Z \to \mathcal{X}$ the base change
$Z \times_\mathcal{Y} \mathcal{X} \to Z$
has property $\mathcal{P}$. Consider the diagram
$$
\xymatrix{
Z \times_\mathcal{Y} U \ar[d] \ar[r] &
Z \times_\mathcal{Y} V \ar[d] \\
Z \times_\mathcal{Y} \mathcal{X} \ar[r] &
Z
}
$$
Note that the top horizontal arrow is a base change of $h$ and
hence has property $\mathcal{P}$. The left vertical arrow is smooth
and surjective and the right vertical arrow is smooth. Thus
Descent on Spaces,
Lemma \ref{spaces-descent-lemma-local-source-target-characterize}
kicks in and shows that $Z \times_\mathcal{Y} \mathcal{X} \to Z$
has property $\mathcal{P}$.
\end{proof}

\begin{definition}
\label{definition-P}
Let $\mathcal{P}$ be a property of morphisms of algebraic spaces
which is smooth local on the source-and-target.
We say a morphism $f : \mathcal{X} \to \mathcal{Y}$ of algebraic stacks
{\it has property $\mathcal{P}$} if the equivalent conditions of
Lemma \ref{lemma-local-source-target}
hold.
\end{definition}

\begin{remark}
\label{remark-composition}
Let $\mathcal{P}$ be a property of morphisms of algebraic spaces
which is smooth local on the source-and-target and stable under composition.
Then the property of morphisms of algebraic stacks defined in
Definition \ref{definition-P}
is stable under composition. Namely, let $f : \mathcal{X} \to \mathcal{Y}$
and $g : \mathcal{Y} \to \mathcal{Z}$ be morphisms of algebraic stacks
having property $\mathcal{P}$. Choose an algebraic space $W$ and a
surjective smooth morphism $W \to \mathcal{Z}$. Choose an algebraic space
$V$ and a surjective smooth morphism $V \to \mathcal{Y} \times_\mathcal{Z} W$.
Finally, choose an algebraic space $U$ and a surjective and smooth morphism
$U \to \mathcal{X} \times_\mathcal{Y} V$. Then the morphisms
$V \to W$ and $U \to V$ have property $\mathcal{P}$ by definition.
Whence $U \to W$ has property $\mathcal{P}$ as we assumed that
$\mathcal{P}$ is stable under composition. Thus, by definition again,
we see that $g \circ f : \mathcal{X} \to \mathcal{Z}$ has
property $\mathcal{P}$.
\end{remark}

\begin{remark}
\label{remark-base-change}
Let $\mathcal{P}$ be a property of morphisms of algebraic spaces
which is smooth local on the source-and-target and stable under base change.
Then the property of morphisms of algebraic stacks defined in
Definition \ref{definition-P}
is stable under base change. Namely, let $f : \mathcal{X} \to \mathcal{Y}$
and $g : \mathcal{Y}' \to \mathcal{Y}$ be morphisms of algebraic stacks
and assume $f$ has property $\mathcal{P}$. Choose an algebraic space $V$
and a surjective smooth morphism $V \to \mathcal{Y}$. Choose an algebraic
space $U$ and a surjective smooth morphism
$U \to \mathcal{X} \times_\mathcal{Y} V$. Finally, choose an algebraic space
$V'$ and a surjective and smooth morphism
$V' \to \mathcal{Y}' \times_\mathcal{Y} V$. Then the morphism
$U \to V$ has property $\mathcal{P}$ by definition.
Whence $V' \times_V U \to V'$ has property $\mathcal{P}$ as we assumed that
$\mathcal{P}$ is stable under base change. Considering the diagram
$$
\xymatrix{
V' \times_V U \ar[r] \ar[d] &
\mathcal{Y}' \times_\mathcal{Y} \mathcal{X} \ar[r] \ar[d] &
\mathcal{X} \ar[d] \\
V' \ar[r] & \mathcal{Y}' \ar[r] & \mathcal{Y}
}
$$
we see that the left top horizontal arrow is smooth and surjective,
whence by definition we see that the projection
$\mathcal{Y}' \times_\mathcal{Y} \mathcal{X} \to \mathcal{Y}'$ has
property $\mathcal{P}$.
\end{remark}

\begin{remark}
\label{remark-implication}
Let $\mathcal{P}, \mathcal{P}'$ be properties of morphisms of algebraic spaces
which are smooth local on the source-and-target.
Suppose that we have $\mathcal{P} \Rightarrow \mathcal{P}'$ for morphisms
of algebraic spaces. Then we also have $\mathcal{P} \Rightarrow \mathcal{P}'$
for the properties of morphisms of algebraic stacks defined in
Definition \ref{definition-P}
using $\mathcal{P}$ and $\mathcal{P}'$. This is clear from the definition.
\end{remark}









\section{Morphisms of finite type}
\label{section-finite-type}

\noindent
The property ``locally of finite type'' of morphisms of algebraic spaces
is smooth local on the source-and-target, see
Descent on Spaces, Remark \ref{spaces-descent-remark-list-local-source-target}.
It is also stable under base change and fpqc local on the target, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-base-change-finite-type}
and
Descent on Spaces,
Lemma \ref{spaces-descent-lemma-descending-property-locally-finite-type}.
Hence, by
Lemma \ref{lemma-local-source-target}
above, we may define what it means for a morphism of algebraic spaces
to be locally of finite type as follows and it agrees with the already
existing notion defined in
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}
when the morphism is representable by algebraic spaces.

\begin{definition}
\label{definition-locally-finite-type}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
\begin{enumerate}
\item We say $f$
{\it locally of finite type} if the equivalent conditions of
Lemma \ref{lemma-local-source-target}
hold with
$\mathcal{P} = \text{locally of finite type}$.
\item We say $f$ is
{\it of finite type} if it is locally of finite type and quasi-compact.
\end{enumerate}
\end{definition}

\begin{lemma}
\label{lemma-composition-finite-type}
The composition of finite type morphisms is of finite type.
The same holds for locally of finite type.
\end{lemma}

\begin{proof}
Combine
Remark \ref{remark-composition}
with
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-composition-finite-type}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-finite-type}
A base change of a finite type morphism is finite type.
The same holds for locally of finite type.
\end{lemma}

\begin{proof}
Combine
Remark \ref{remark-base-change}
with
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-finite-type}.
\end{proof}

\begin{lemma}
\label{lemma-immersion-locally-finite-type}
An immersion is locally of finite type.
\end{lemma}

\begin{proof}
Combine Remark \ref{remark-implication} with
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-immersion-locally-finite-type}.
\end{proof}

\begin{lemma}
\label{lemma-locally-finite-type-locally-noetherian}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
If $f$ is locally of finite type and $\mathcal{Y}$ is locally Noetherian,
then $\mathcal{X}$ is locally Noetherian.
\end{lemma}

\begin{proof}
Let
$$
\xymatrix{
U \ar[d] \ar[r] & V \ar[d] \\
\mathcal{X} \ar[r] & \mathcal{Y}
}
$$
be a commutative diagram where $U$, $V$ are schemes,
$V \to \mathcal{Y}$ is surjective and smooth, and
$U \to V \times_\mathcal{Y} \mathcal{X}$ is surjective and smooth.
Then $U \to V$ is locally of finite type. If $\mathcal{Y}$ is
locally Noetherian, then $V$ is locally Noetherian. By
Morphisms, Lemma \ref{morphisms-lemma-finite-type-noetherian}
we see that $U$ is locally Noetherian, which means that $\mathcal{X}$
is locally Noetherian.
\end{proof}

\noindent
The following two lemmas will be improved on later (after we have discussed
morphisms of algebraic stacks which are locally of finite presentation).

\begin{lemma}
\label{lemma-check-finite-type-covering}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $W \to \mathcal{Y}$ be a surjective, flat, and locally of finite
presentation where $W$ is an algebraic space. If the base change
$W \times_\mathcal{Y} \mathcal{X} \to W$ is
locally of finite type, then $f$ is locally of finite type.
\end{lemma}

\begin{proof}
Choose an algebraic space $V$ and a surjective smooth morphism
$V \to \mathcal{Y}$. Choose an algebraic space $U$ and a surjective
smooth morphism $U \to V \times_\mathcal{Y} \mathcal{X}$.
We have to show that $U \to V$ is locally of finite presentation.
Now we base change everything by $W \to \mathcal{Y}$: Set
$U' = W \times_\mathcal{Y} U$,
$V' = W \times_\mathcal{Y} V$,
$\mathcal{X}' = W \times_\mathcal{Y} \mathcal{X}$,
and $\mathcal{Y}' = W \times_\mathcal{Y} \mathcal{Y} = W$.
Then it is still true that $U' \to V' \times_{\mathcal{Y}'} \mathcal{X}'$
is smooth by base change. Hence by our definition of locally finite type
morphisms of algebraic stacks and the assumption that
$\mathcal{X}' \to \mathcal{Y}'$ is locally of finite type,
we see that $U' \to V'$ is locally of finite type. Then, since
$V' \to V$ is surjective, flat, and locally of finite presentation
as a base change of $W \to \mathcal{Y}$ we see that $U \to V$ is
locally of finite type by
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-locally-finite-type}
and we win.
\end{proof}

\begin{lemma}
\label{lemma-check-finite-type-precompose}
Let $\mathcal{X} \to \mathcal{Y} \to \mathcal{Z}$ be morphisms of
algebraic stacks. Assume $\mathcal{X} \to \mathcal{Z}$ is locally of finite
type and that $\mathcal{X} \to \mathcal{Y}$ is representable by algebraic
spaces, surjective, flat, and locally of finite presentation.
Then $\mathcal{Y} \to \mathcal{Z}$ is locally of finite type.
\end{lemma}

\begin{proof}
Choose an algebraic space $W$ and a surjective smooth morphism
$W \to \mathcal{Z}$. Choose an algebraic space $V$ and a surjective smooth
morphism $V \to W \times_\mathcal{Z} \mathcal{Y}$. Set
$U = V \times_\mathcal{Y} \mathcal{X}$ which is an algebraic space.
We know that $U \to V$ is surjective, flat, and locally of finite presentation
and that $U \to W$ is locally of finite type.
Hence the lemma reduces to the case of morphisms of algebraic spaces.
The case of morphisms of algebraic spaces is
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-locally-finite-type-fppf-local-source}.
\end{proof}

\begin{lemma}
\label{lemma-finite-type-permanence}
Let $f : \mathcal{X} \to \mathcal{Y}$,
$g : \mathcal{Y} \to \mathcal{Z}$ be morphisms of algebraic stacks.
If $g \circ f : \mathcal{X} \to \mathcal{Z}$ is locally of finite type,
then $f : \mathcal{X} \to \mathcal{Y}$ is locally of finite type.
\end{lemma}

\begin{proof}
We can find a diagram
$$
\xymatrix{
U \ar[r] \ar[d] & V \ar[r] \ar[d] & W \ar[d] \\
\mathcal{X} \ar[r] & \mathcal{Y} \ar[r] & \mathcal{Z}
}
$$
where $U$, $V$, $W$ are schemes, the vertical arrow $W \to \mathcal{Z}$
is surjective and smooth, the arrow $V \to \mathcal{Y} \times_\mathcal{Z} W$
is surjective and smooth, and the arrow
$U \to \mathcal{X} \times_\mathcal{Y} V$ is surjective and smooth.
Then also $U \to \mathcal{X} \times_\mathcal{Z} V$ is surjective and
smooth (as a composition of a surjective and smooth morphism with a
base change of such). By definition we see that $U \to W$ is locally
of finite type. Hence $U \to V$ is locally of finite type by
Morphisms, Lemma \ref{morphisms-lemma-permanence-finite-type}
which in turn means (by definition) that $\mathcal{X} \to \mathcal{Y}$
is locally of finite type.
\end{proof}










\section{Points of finite type}
\label{section-points-finite-type}

\noindent
Let $\mathcal{X}$ be an algebraic stack.
A finite type point $x \in |\mathcal{X}|$ is a point which can be represented
by a morphism $\Spec(k) \to \mathcal{X}$ which is locally of finite type.
Finite type points are a suitable replacement of closed points for algebraic
spaces and algebraic stacks. There are always ``enough of them'' for example.

\begin{lemma}
\label{lemma-point-finite-type}
Let $\mathcal{X}$ be an algebraic stack.
Let $x \in |\mathcal{X}|$. The following are equivalent:
\begin{enumerate}
\item There exists a morphism $\Spec(k) \to \mathcal{X}$
which is locally of finite type and represents $x$.
\item There exists a scheme $U$, a closed point $u \in U$, and a smooth
morphism $\varphi : U \to \mathcal{X}$ such that $\varphi(u) = x$.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $u \in U$ and $U \to \mathcal{X}$ be as in (2). Then
$\Spec(\kappa(u)) \to U$ is of finite type, and $U \to \mathcal{X}$ is
representable and locally of finite type (by
Morphisms of Spaces,
Lemmas \ref{spaces-morphisms-lemma-etale-locally-finite-presentation} and
\ref{spaces-morphisms-lemma-finite-presentation-finite-type}).
Hence we see (1) holds by
Lemma \ref{lemma-composition-finite-type}.

\medskip\noindent
Conversely, assume $\Spec(k) \to \mathcal{X}$ is locally of finite type
and represents $x$. Let $U \to \mathcal{X}$ be a surjective smooth morphism
where $U$ is a scheme. By assumption
$U \times_\mathcal{X} \Spec(k) \to U$ is a morphism of algebraic
spaces which is locally of finite type. Pick a finite type point $v$ of
$U \times_\mathcal{X} \Spec(k)$ (there exists at least one, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-identify-finite-type-points}).
By
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-finite-type-points-morphism}
the image $u \in U$ of $v$ is a finite type point of $U$.
Hence by
Morphisms, Lemma \ref{morphisms-lemma-identify-finite-type-points}
after shrinking $U$ we may assume that $u$ is a closed point of $U$, i.e.,
(2) holds.
\end{proof}

\begin{definition}
\label{definition-finite-type-point}
Let $\mathcal{X}$ be an algebraic stack. We say a point $x \in |\mathcal{X}|$
is a {\it finite type point}\footnote{This is a
slight abuse of language as it would perhaps be more correct to say
``locally finite type point''.} if the equivalent conditions of
Lemma \ref{lemma-point-finite-type}
are satisfied. We denote $\mathcal{X}_{\text{ft-pts}}$
the set of finite type points of $\mathcal{X}$.
\end{definition}

\noindent
We can describe the set of finite type points as follows.

\begin{lemma}
\label{lemma-identify-finite-type-points}
Let $\mathcal{X}$ be an algebraic stack. We have
$$
\mathcal{X}_{\text{ft-pts}} =
\bigcup\nolimits_{\varphi : U \to \mathcal{X}\text{ smooth}} |\varphi|(U_0)
$$
where $U_0$ is the set of closed points of $U$.
Here we may let $U$ range over all schemes smooth over $\mathcal{X}$
or over all affine schemes smooth over $\mathcal{X}$.
\end{lemma}

\begin{proof}
Immediate from
Lemma \ref{lemma-point-finite-type}.
\end{proof}

\begin{lemma}
\label{lemma-finite-type-points-morphism}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
If $f$ is locally of finite type, then
$f(\mathcal{X}_{\text{ft-pts}}) \subset \mathcal{Y}_{\text{ft-pts}}$.
\end{lemma}

\begin{proof}
Take $x \in \mathcal{X}_{\text{ft-pts}}$. Represent $x$ by a locally
finite type morphism $x : \Spec(k) \to \mathcal{X}$. Then
$f \circ x$ is locally of finite type by
Lemma \ref{lemma-composition-finite-type}.
Hence $f(x) \in \mathcal{Y}_{\text{ft-pts}}$.
\end{proof}

\begin{lemma}
\label{lemma-finite-type-points-surjective-morphism}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
If $f$ is locally of finite type and surjective, then
$f(\mathcal{X}_{\text{ft-pts}}) = \mathcal{Y}_{\text{ft-pts}}$.
\end{lemma}

\begin{proof}
We have $f(\mathcal{X}_{\text{ft-pts}}) \subset \mathcal{Y}_{\text{ft-pts}}$ by
Lemma \ref{lemma-finite-type-points-morphism}.
Let $y \in |\mathcal{Y}|$ be a finite type point. Represent $y$ by a morphism
$\Spec(k) \to \mathcal{Y}$ which is locally of finite type.
As $f$ is surjective the algebraic stack
$\mathcal{X}_k = \Spec(k) \times_\mathcal{Y} \mathcal{X}$ is nonempty,
therefore has a finite type point $x \in |\mathcal{X}_k|$ by
Lemma \ref{lemma-identify-finite-type-points}.
Now $\mathcal{X}_k \to \mathcal{X}$ is a morphism which is locally of finite
type as a base change of $\Spec(k) \to \mathcal{Y}$
(Lemma \ref{lemma-base-change-finite-type}).
Hence the image of $x$ in $\mathcal{X}$ is a finite type point by
Lemma \ref{lemma-finite-type-points-morphism}
which maps to $y$ by construction.
\end{proof}

\begin{lemma}
\label{lemma-enough-finite-type-points}
Let $\mathcal{X}$ be an algebraic stack.
For any locally closed subset $T \subset |\mathcal{X}|$ we have
$$
T \not = \emptyset
\Rightarrow
T \cap \mathcal{X}_{\text{ft-pts}} \not = \emptyset.
$$
In particular, for any closed subset $T \subset |\mathcal{X}|$ we
see that $T \cap \mathcal{X}_{\text{ft-pts}}$ is dense in $T$.
\end{lemma}

\begin{proof}
Let $i : \mathcal{Z} \to \mathcal{X}$ be the reduced induced substack
structure on $T$, see
Properties of Stacks,
Remark \ref{stacks-properties-remark-stack-structure-locally-closed-subset}.
An immersion is locally of finite type, see
Lemma \ref{lemma-immersion-locally-finite-type}.
Hence by
Lemma \ref{lemma-finite-type-points-morphism}
we see
$\mathcal{Z}_{\text{ft-pts}} \subset \mathcal{X}_{\text{ft-pts}} \cap T$.
Finally, any nonempty affine scheme $U$ with a smooth morphism towards
$\mathcal{Z}$ has at least one closed point, hence $\mathcal{Z}$ has at least
one finite type point by
Lemma \ref{lemma-identify-finite-type-points}.
The lemma follows.
\end{proof}

\noindent
Here is another, more technical, characterization of a finite type
point on an algebraic stack. It tells us in particular that the residual
gerbe of $\mathcal{X}$ at $x$ exists whenever $x$ is a finite type point!

\begin{lemma}
\label{lemma-point-finite-type-monomorphism}
Let $\mathcal{X}$ be an algebraic stack.
Let $x \in |\mathcal{X}|$. The following are equivalent:
\begin{enumerate}
\item $x$ is a finite type point,
\item there exists an algebraic stack $\mathcal{Z}$
whose underlying topological space $|\mathcal{Z}|$ is a singleton,
and a morphism $f : \mathcal{Z} \to \mathcal{X}$ which is
locally of finite type such that $\{x\} = |f|(|\mathcal{Z}|)$, and
\item the residual gerbe $\mathcal{Z}_x$ of $\mathcal{X}$ at $x$ exists
and the inclusion morphism $\mathcal{Z}_x \to \mathcal{X}$ is locally of
finite type.
\end{enumerate}
\end{lemma}

\begin{proof}
(All of the morphisms occurring in this paragraph are representable
by algebraic spaces, hence the conventions and results of
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}
are applicable.)
Assume $x$ is a finite type point. Choose an affine scheme $U$,
a closed point $u \in U$, and a smooth morphism $\varphi : U \to \mathcal{X}$
with $\varphi(u) = x$, see
Lemma \ref{lemma-identify-finite-type-points}.
Set $u = \Spec(\kappa(u))$ as usual. Set $R = u \times_\mathcal{X} u$
so that we obtain a groupoid in algebraic spaces
$(u, R, s, t, c)$, see
Algebraic Stacks, Lemma \ref{algebraic-lemma-map-space-into-stack}.
The projection morphisms $R \to u$ are the compositions
$$
R = u \times_\mathcal{X} u \to
u \times_\mathcal{X} U \to
u \times_\mathcal{X} X = u
$$
where the first arrow is of finite type (a base change of the closed
immersion of schemes $u \to U$) and the second arrow is smooth (a base
change of the smooth morphism $U \to \mathcal{X}$). Hence
$s, t : R \to u$ are locally of finite type (as compositions, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-composition-finite-type}).
Since $u$ is the spectrum of a field, it follows that
$s, t$ are flat and locally of finite presentation (by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-noetherian-finite-type-finite-presentation}).
We see that $\mathcal{Z} = [u/R]$ is an algebraic stack by
Criteria for Representability,
Theorem \ref{criteria-theorem-flat-groupoid-gives-algebraic-stack}.
By
Algebraic Stacks, Lemma \ref{algebraic-lemma-map-space-into-stack}
we obtain a canonical morphism
$$
f : \mathcal{Z} \longrightarrow \mathcal{X}
$$
which is fully faithful. Hence this morphism is representable by
algebraic spaces, see
Algebraic Stacks, Lemma
\ref{algebraic-lemma-characterize-representable-by-algebraic-spaces}
and a monomorphism, see
Properties of Stacks, Lemma \ref{stacks-properties-lemma-monomorphism}.
It follows that the residual gerbe $\mathcal{Z}_x \subset \mathcal{X}$
of $\mathcal{X}$ at $x$ exists and that $f$ factors through an
equivalence $\mathcal{Z} \to \mathcal{Z}_x$, see
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-residual-gerbe-unique}.
By construction the diagram
$$
\xymatrix{
u \ar[d] \ar[r] & U \ar[d] \\
\mathcal{Z} \ar[r]^f & \mathcal{X}
}
$$
is commutative. By
Criteria for Representability,
Lemma \ref{criteria-lemma-flat-quotient-flat-presentation}
the left vertical arrow is surjective, flat, and locally of finite
presentation. Consider
$$
\xymatrix{
u \times_\mathcal{X} U \ar[d] \ar[r] &
\mathcal{Z} \times_\mathcal{X} U \ar[r] \ar[d] & U \ar[d] \\
u \ar[r] & \mathcal{Z} \ar[r]^f & \mathcal{X}
}
$$
As $u \to \mathcal{X}$ is locally of finite type, we see that the base change
$u \times_\mathcal{X} U \to U$ is locally of finite type. Moreover,
$u \times_\mathcal{X} U \to \mathcal{Z} \times_\mathcal{X} U$ is
surjective, flat, and locally of finite presentation as a base change of
$u \to \mathcal{Z}$. Thus
$\{u \times_\mathcal{X} U \to \mathcal{Z} \times_\mathcal{X} U\}$
is an fppf covering of algebraic spaces, and we conclude that
$\mathcal{Z} \times_\mathcal{X} U \to U$ is locally of finite type by
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-locally-finite-presentation-fppf-local-source}.
By definition this means that $f$ is locally of finite type (because the
vertical arrow $\mathcal{Z} \times_\mathcal{X} U \to \mathcal{Z}$ is smooth
as a base change of $U \to \mathcal{X}$ and surjective as $\mathcal{Z}$ has
only one point). Since $\mathcal{Z} = \mathcal{Z}_x$ we see that (3) holds.

\medskip\noindent
It is clear that (3) implies (2).
If (2) holds then $x$ is a finite type point of $\mathcal{X}$ by
Lemma \ref{lemma-finite-type-points-morphism}
and
Lemma \ref{lemma-enough-finite-type-points}
to see that $\mathcal{Z}_{\text{ft-pts}}$ is nonempty, i.e., the
unique point of $\mathcal{Z}$ is a finite type point of $\mathcal{Z}$.
\end{proof}







\section{Automorphism groups}
\label{section-automorphism-groups}

\noindent
Let $\mathcal{X}$ be an algebraic stack. Let $x \in |\mathcal{X}|$
correspond to $x : \Spec(k) \to \mathcal{X}$. In this situation we
often use the phrase
``let $G_x/k$ be the automorphism group algebraic space of $x$''.
This just means that
$$
G_x = \mathit{Isom}_\mathcal{X}(x, x) =
\Spec(k) \times_\mathcal{X} \mathcal{I}_\mathcal{X}
$$
is the group algebraic space of automorphism of $x$. This is a
group algebraic space over $\Spec(k)$. If $k'/k$ is an extension of fields
then the automorphism group algebraic space of the induced morphism
$x' : \Spec(k') \to \mathcal{X}$ is the base change of $G_x$
to $\Spec(k')$.

\begin{lemma}
\label{lemma-automorphism-group-scheme}
In the situation above $G_x$ is a scheme if one of the following
holds
\begin{enumerate}
\item $\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$
is quasi-separated
\item $\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$
is locally separated,
\item $\mathcal{X}$ is quasi-DM,
\item $\mathcal{I}_\mathcal{X} \to \mathcal{X}$
is quasi-separated,
\item $\mathcal{I}_\mathcal{X} \to \mathcal{X}$
is locally separated, or
\item $\mathcal{I}_\mathcal{X} \to \mathcal{X}$
is locally quasi-finite.
\end{enumerate}
\end{lemma}

\begin{proof}
Observe that (1) $\Rightarrow$ (4), (2) $\Rightarrow$ (5), and
(3) $\Rightarrow$ (6) by
Lemma \ref{lemma-diagonal-diagonal}.
In case (4) we see that $G_x$ is a quasi-separated
algebraic space and in case (5) we see that $G_x$
is a locally separated algebraic space.
In both cases $G_x$ is a decent algebraic space
(Decent Spaces, Section \ref{decent-spaces-section-reasonable-decent} and
Lemma \ref{decent-spaces-lemma-locally-separated-decent}).
Then $G_x$ is separated by More on Groupoids in Spaces, Lemma
\ref{spaces-more-groupoids-lemma-group-scheme-over-field-separated}
whereupon we conclude that $G_x$ is a scheme by
More on Groupoids in Spaces, Proposition
\ref{spaces-more-groupoids-proposition-group-space-scheme-over-field}.
In case (6) we see that $G_x \to \Spec(k)$ is locally quasi-finite
and hence $G_x$ is a scheme by
Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-locally-quasi-finite-over-field}.
\end{proof}

\begin{lemma}
\label{lemma-property-automorphism-groups}
Let $\mathcal{X}$ be an algebraic stack. Let $x \in |\mathcal{X}|$ be a point.
Let $P$ be a property of algebraic spaces over fields which is invariant
under ground field extensions; for example
$P(X/k) = X \to \Spec(k)\text{ is finite}$.
The following are equivalent
\begin{enumerate}
\item for some morphism $x : \Spec(k) \to \mathcal{X}$ in the
class of $x$ the automorphism group algebraic space $G_x/k$
has $P$, and
\item for any morphism $x : \Spec(k) \to \mathcal{X}$ in the
class of $x$ the automorphism group algebraic space $G_x/k$
has $P$.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{remark}
\label{remark-property-automorphism-groups}
Let $P$ be a property of algebraic spaces over fields which is invariant
under ground field extensions. Given an algebraic stack $\mathcal{X}$
and $x \in |\mathcal{X}|$, we say the automorphism group of $\mathcal{X}$
at $x$ has $P$ if the equivalent conditions of
Lemma \ref{lemma-property-automorphism-groups} are satisfied.
For example, we say {\it the automorphism group of $\mathcal{X}$
at $x$ is finite}, if $G_x \to \Spec(k)$ is finite whenever
$x : \Spec(k) \to \mathcal{X}$ is a representative of $x$.
Similarly for smooth, proper, etc.
(There is clearly an abuse of language going on here, but we
believe it will not cause confusion or imprecision.)
\end{remark}

\begin{lemma}
\label{lemma-iso-automorphism-groups}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $x \in |\mathcal{X}|$ be a point. The following are equivalent
\begin{enumerate}
\item for some morphism $x : \Spec(k) \to \mathcal{X}$ in the
class of $x$ setting $y = f \circ x$ the map
$G_x \to G_y$ of automorphism group algebraic spaces
is an isomorphism, and
\item for any morphism $x : \Spec(k) \to \mathcal{X}$ in the
class of $x$ setting $y = f \circ x$ the map
$G_x \to G_y$ of automorphism group algebraic spaces
is an isomorphism.
\end{enumerate}
\end{lemma}

\begin{proof}
This comes down to the fact that being an isomorphism
is fpqc local on the target, see
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-isomorphism}.
Namely, suppose that $k'/k$ is an extension of fields and
denote $x' : \Spec(k') \to \mathcal{X}$ the composition
and set $y' = f \circ x'$.
Then the morphism $G_{x'} \to G_{y'}$ is the base change
of $G_x \to G_y$ by $\Spec(k') \to \Spec(k)$.
Hence $G_x \to G_y$ is an isomorphism
if and only if $G_{x'} \to G_{y'}$ is an isomorphism.
Thus we see that the property propagates through the
equivalence class if it holds for one.
\end{proof}

\begin{remark}
\label{remark-identify-automorphism-groups}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $x \in |\mathcal{X}|$ be a point. To indicate the equivalent
conditions of Lemma \ref{lemma-iso-automorphism-groups}
are satisfied for $f$ and $x$ in the literature the terminology
{\it $f$ is stabilizer preserving at $x$} or
{\it $f$ is fixed-point reflecting at $x$} is used.
We prefer to say {\it $f$ induces an isomorphism between
automorphism groups at $x$ and $f(x)$}.
\end{remark}





\section{Presentations and properties of algebraic stacks}
\label{section-presentations-properties}

\noindent
Let $(U, R, s, t, c)$ be a groupoid in algebraic spaces.
If $s, t : R \to U$ are flat and locally of finite presentation,
then the quotient stack $[U/R]$ is an algebraic stack, see
Criteria for Representability, Theorem
\ref{criteria-theorem-flat-groupoid-gives-algebraic-stack}.
In this section we study what properties of $(U, R, s, t, c)$
imply for the algebraic stack $[U/R]$.

\begin{lemma}
\label{lemma-properties-diagonal-from-presentation}
Let $(U, R, s, t, c)$ be a groupoid in algebraic spaces such that
$s, t : R \to U$ are flat and locally of finite presentation.
Consider the algebraic stack $\mathcal{X} = [U/R]$ (see above).
\begin{enumerate}
\item If $R \to U \times U$ is separated, then
$\Delta_\mathcal{X}$ is separated.
\item If $U$, $R$ are separated, then $\Delta_\mathcal{X}$ is separated.
\item If $R \to U \times U$ is locally quasi-finite, then $\mathcal{X}$
is quasi-DM.
\item If $s, t : R \to U$ are locally quasi-finite, then
$\mathcal{X}$ is quasi-DM.
\item If $R \to U \times U$ is proper, then $\mathcal{X}$ is separated.
\item If $s, t : R \to U$ are proper and $U$ is separated, then
$\mathcal{X}$ is separated.
\item Add more here.
\end{enumerate}
\end{lemma}

\begin{proof}
Observe that the morphism $U \to \mathcal{X}$ is surjective, flat, and
locally of finite presentation by
Criteria for Representability, Lemma
\ref{criteria-lemma-flat-quotient-flat-presentation}.
Hence the same is true for $U \times U \to \mathcal{X} \times \mathcal{X}$.
We have the cartesian diagram
$$
\xymatrix{
R  = U \times_\mathcal{X} U \ar[r] \ar[d] & U \times U \ar[d] \\
\mathcal{X} \ar[r] & \mathcal{X} \times \mathcal{X}
}
$$
(see Groupoids in Spaces, Lemma
\ref{spaces-groupoids-lemma-quotient-stack-2-cartesian}).
Thus we see that $\Delta_\mathcal{X}$ has one of the properties listed in
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}
if and only if the morphism $R \to U \times U$ does, see
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-check-property-covering}.
This explains why (1), (3), and (5) are true.
The condition in (2) implies $R \to U \times U$ is separated
hence (2) follows from (1).
The condition in (4) implies the condition in (3)
hence (4) follows from (3).
The condition in (6) implies the condition in (5)
by Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-closed-permanence}
hence (6) follows from (5).
\end{proof}

\begin{lemma}
\label{lemma-points-presentation}
Let $(U, R, s, t, c)$ be a groupoid in algebraic spaces such that
$s, t : R \to U$ are flat and locally of finite presentation.
Consider the algebraic stack $\mathcal{X} = [U/R]$ (see above).
Then the image of $|R| \to |U| \times |U|$ is an equivalence relation
and $|\mathcal{X}|$ is the quotient of $|U|$ by this equivalence relation.
\end{lemma}

\begin{proof}
The induced morphism $p : U \to \mathcal{X}$ is surjective, flat,
and locally of finite presentation, see
Criteria for Representability, Lemma
\ref{criteria-lemma-flat-quotient-flat-presentation}.
Hence $|U| \to |\mathcal{X}|$ is surjective by
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-characterize-surjective}.
Note that $R = U \times_\mathcal{X} U$, see
Groupoids in Spaces,
Lemma \ref{spaces-groupoids-lemma-quotient-stack-2-cartesian}.
Hence
Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian}
implies the map
$$
|R| \longrightarrow |U| \times_{|\mathcal{X}|} |U|
$$
is surjective. Hence the image of $|R| \to |U| \times |U|$ is
exactly the set of pairs $(u_1, u_2) \in |U| \times |U|$
such that $u_1$ and $u_2$ have the same image in $|\mathcal{X}|$.
Combining these two statements we get the result of the lemma.
\end{proof}






\section{Special presentations of algebraic stacks}
\label{section-presentations}

\noindent
In this section we prove two important theorems.
The first is the characterization of quasi-DM stacks $\mathcal{X}$
as the stacks of the form $\mathcal{X} = [U/R]$ with $s, t : R \to U$ locally
quasi-finite (as well as flat and locally of finite presentation).
The second is the statement that DM algebraic stacks are Deligne-Mumford.

\medskip\noindent
The following lemma gives a criterion for when a ``slice''
of a presentation is still flat over the algebraic stack.

\begin{lemma}
\label{lemma-slice}
Let $\mathcal{X}$ be an algebraic stack.
Consider a cartesian diagram
$$
\xymatrix{
U \ar[d] & F \ar[l]^p \ar[d] \\
\mathcal{X} & \Spec(k) \ar[l]
}
$$
where $U$ is an algebraic space, $k$ is a field, and $U \to \mathcal{X}$
is flat and locally of finite presentation. Let
$f_1, \ldots, f_r \in \Gamma(U, \mathcal{O}_U)$
and $z \in |F|$ such that $f_1, \ldots, f_r$ map to a regular sequence
in the local ring $\mathcal{O}_{F, \overline{z}}$.
Then, after replacing $U$ by an open subspace containing $p(z)$, the morphism
$$
V(f_1, \ldots, f_r) \longrightarrow \mathcal{X}
$$
is flat and locally of finite presentation.
\end{lemma}

\begin{proof}
Choose a scheme $W$ and a surjective smooth morphism $W \to \mathcal{X}$.
Choose an extension of fields $k'/k$ and a morphism
$w : \Spec(k') \to W$ such that $\Spec(k') \to W \to \mathcal{X}$
is $2$-isomorphic to $\Spec(k') \to \Spec(k) \to \mathcal{X}$.
This is possible as $W \to \mathcal{X}$ is surjective.
Consider the commutative diagram
$$
\xymatrix{
U \ar[d] &
U \times_\mathcal{X} W \ar[l]^-{\text{pr}_0} \ar[d] &
F' \ar[l]^-{p'} \ar[d] \\
\mathcal{X} &
W \ar[l] &
\Spec(k') \ar[l]
}
$$
both of whose squares are cartesian. By our choice of $w$ we see that
$F' = F \times_{\Spec(k)} \Spec(k')$. Thus $F' \to F$ is
surjective and we can choose a point $z' \in |F'|$ mapping to $z$.
Since $F' \to F$ is flat we see that
$\mathcal{O}_{F, \overline{z}} \to \mathcal{O}_{F', \overline{z}'}$ is
flat, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-flat-at-point-etale-local-rings}.
Hence $f_1, \ldots, f_r$ map to a regular sequence in
$\mathcal{O}_{F', \overline{z}'}$, see
Algebra, Lemma \ref{algebra-lemma-flat-increases-depth}.
Note that $U \times_\mathcal{X} W \to W$ is a morphism of algebraic spaces
which is flat and locally of finite presentation. Hence by
More on Morphisms of Spaces, Lemma \ref{spaces-more-morphisms-lemma-slice}
we see that there exists an open subspace $U'$ of $U \times_\mathcal{X} W$
containing $p(z')$ such that the intersection
$U' \cap (V(f_1, \ldots, f_r) \times_\mathcal{X} W)$ is flat and locally
of finite presentation over $W$. Note that
$\text{pr}_0(U')$ is an open subspace of $U$ containing $p(z)$
as $\text{pr}_0$ is smooth hence open. Now we see that
$U' \cap (V(f_1, \ldots, f_r) \times_\mathcal{X} W) \to \mathcal{X}$
is flat and locally of finite presentation as the composition
$$
U' \cap (V(f_1, \ldots, f_r) \times_\mathcal{X} W) \to W \to \mathcal{X}.
$$
Hence
Properties of Stacks,
Lemma \ref{stacks-properties-lemma-check-property-after-precomposing}
implies $\text{pr}_0(U') \cap V(f_1, \ldots, f_r) \to \mathcal{X}$
is flat and locally of finite presentation as desired.
\end{proof}

\begin{lemma}
\label{lemma-quasi-finite-at-point}
Let $\mathcal{X}$ be an algebraic stack. Consider a cartesian diagram
$$
\xymatrix{
U \ar[d] & F \ar[l]^p \ar[d] \\
\mathcal{X} & \Spec(k) \ar[l]
}
$$
where $U$ is an algebraic space, $k$ is a field, and $U \to \mathcal{X}$
is locally of finite type. Let $z \in |F|$ be such that $\dim_z(F) = 0$.
Then, after replacing $U$ by an open subspace containing $p(z)$, the morphism
$$
U \longrightarrow \mathcal{X}
$$
is locally quasi-finite.
\end{lemma}

\begin{proof}
Since $f : U \to \mathcal{X}$ is locally of finite type there exists a
maximal open $W(f) \subset U$ such that the restriction
$f|_{W(f)} : W(f) \to \mathcal{X}$ is locally quasi-finite, see
Properties of Stacks, Remark
\ref{stacks-properties-remark-local-source-apply}
(\ref{stacks-properties-item-loc-quasi-finite}).
Hence all we need to do is prove that $p(z)$ is a point of $W(f)$.
Moreover, the remark referenced above also shows the formation of $W(f)$
commutes with arbitrary base change by a morphism which is representable
by algebraic spaces. Hence it suffices to show that the morphism
$F \to \Spec(k)$ is locally quasi-finite at $z$. This follows
immediately from
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite-rel-dimension-0}.
\end{proof}

\noindent
A quasi-DM stack has a locally quasi-finite ``covering'' by a scheme.

\begin{theorem}
\label{theorem-quasi-DM}
Let $\mathcal{X}$ be an algebraic stack. The following are equivalent
\begin{enumerate}
\item $\mathcal{X}$ is quasi-DM, and
\item there exists a scheme $W$ and a surjective, flat, locally finitely
presented, locally quasi-finite morphism $W \to \mathcal{X}$.
\end{enumerate}
\end{theorem}

\begin{proof}
The implication (2) $\Rightarrow$ (1) is
Lemma \ref{lemma-properties-covering-imply-diagonal}.
Assume (1).
Let $x \in |\mathcal{X}|$ be a finite type point. We will produce a scheme
over $\mathcal{X}$ which ``works'' in a neighbourhood of $x$. At the end
of the proof we will take the disjoint union of all of these to conclude.

\medskip\noindent
Let $U$ be an affine scheme, $U \to \mathcal{X}$ a smooth morphism, and
$u \in U$ a closed point which maps to $x$, see
Lemma \ref{lemma-point-finite-type}.
Denote $u = \Spec(\kappa(u))$ as usual. Consider the following
commutative diagram
$$
\xymatrix{
u \ar[d] & R \ar[l] \ar[d] \\
U \ar[d] & F \ar[d] \ar[l]^p \\
\mathcal{X} & u \ar[l]
}
$$
with both squares fibre product squares, in particular
$R = u \times_\mathcal{X} u$. In the proof of
Lemma \ref{lemma-point-finite-type-monomorphism}
we have seen that $(u, R, s, t, c)$ is a groupoid in algebraic spaces
with $s, t$ locally of finite type. Let $G \to u$ be the stabilizer group
algebraic space (see
Groupoids in Spaces, Definition
\ref{spaces-groupoids-definition-stabilizer-groupoid}).
Note that
$$
G = R \times_{(u \times u)} u =
(u \times_\mathcal{X} u) \times_{(u \times u)} u =
\mathcal{X} \times_{\mathcal{X} \times \mathcal{X}} u.
$$
As $\mathcal{X}$ is quasi-DM we see that
$G$ is locally quasi-finite over $u$. By
More on Groupoids in Spaces, Lemma
\ref{spaces-more-groupoids-lemma-groupoid-on-field-dimension-equal-stabilizer}
we have $\dim(R) = 0$.

\medskip\noindent
Let $e : u \to R$ be the identity of the groupoid. Thus both compositions
$u \to R \to u$ are equal to the identity morphism of $u$.
Note that $R \subset F$ is a closed
subspace as $u \subset U$ is a closed subscheme. Hence we can also think
of $e$ as a point of $F$. Consider the maps of \'etale local rings
$$
\mathcal{O}_{U, u}
\xrightarrow{p^\sharp}
\mathcal{O}_{F, \overline{e}}
\longrightarrow
\mathcal{O}_{R, \overline{e}}
$$
Note that $\mathcal{O}_{R, \overline{e}}$ has dimension $0$ by the result
of the first paragraph. On the other hand, the kernel of the second arrow is
$p^\sharp(\mathfrak m_u)\mathcal{O}_{F, \overline{e}}$ as
$R$ is cut out in $F$ by $\mathfrak m_u$. Thus we see that
$$
\mathfrak m_{\overline{z}} =
\sqrt{p^\sharp(\mathfrak m_u)\mathcal{O}_{F, \overline{e}}}
$$
On the other hand, as the morphism $U \to \mathcal{X}$ is smooth
we see that $F \to u$ is a smooth morphism of algebraic spaces.
This means that $F$ is a regular algebraic space
(Spaces over Fields, Lemma \ref{spaces-over-fields-lemma-smooth-regular}).
Hence $\mathcal{O}_{F, \overline{e}}$ is a regular local ring
(Properties of Spaces, Lemma \ref{spaces-properties-lemma-regular}).
Note that a regular local ring is Cohen-Macaulay
(Algebra, Lemma \ref{algebra-lemma-regular-ring-CM}).
Let $d = \dim(\mathcal{O}_{F, \overline{e}})$. By
Algebra, Lemma \ref{algebra-lemma-find-sequence-image-regular}
we can find $f_1, \ldots, f_d \in \mathcal{O}_{U, u}$ whose images
$\varphi(f_1), \ldots, \varphi(f_d)$ form a regular sequence
in $\mathcal{O}_{F, \overline{z}}$. By
Lemma \ref{lemma-slice}
after shrinking $U$ we may assume that
$Z = V(f_1, \ldots, f_d) \to \mathcal{X}$ is flat and
locally of finite presentation. Note that by construction
$F_Z = Z \times_\mathcal{X} u$ is a closed subspace of
$F = U \times_\mathcal{X} u$, that $e$ is a point of this closed subspace,
and that
$$
\dim(\mathcal{O}_{F_Z, \overline{e}}) = 0.
$$
By
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-dimension-fibre-at-a-point}
it follows that $\dim_e(F_Z) = 0$ because the transcendence degree
of $e$ relative to $u$ is zero. Hence it follows from
Lemma \ref{lemma-quasi-finite-at-point}
that after possibly shrinking $U$ the morphism $Z \to \mathcal{X}$
is locally quasi-finite.

\medskip\noindent
We conclude that for every finite type point $x$ of $\mathcal{X}$ there
exists a locally quasi-finite, flat, locally finitely presented
morphism $f_x : Z_x \to \mathcal{X}$ with $x$ in the image of $|f_x|$.
Set $W = \coprod_x Z_x$ and $f = \coprod f_x$. Then $f$ is flat, locally
of finite presentation, and locally quasi-finite. In particular the
image of $|f|$ is open, see
Properties of Stacks, Lemma \ref{stacks-properties-lemma-topology-points}.
By construction the image contains all finite type points of $\mathcal{X}$,
hence $f$ is surjective by
Lemma \ref{lemma-enough-finite-type-points} (and
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-characterize-surjective}).
\end{proof}

\begin{lemma}
\label{lemma-DM-residual-gerbe}
Let $\mathcal{Z}$ be a DM, locally Noetherian, reduced algebraic stack
with $|\mathcal{Z}|$ a singleton. Then there exists a field $k$ and
a surjective \'etale morphism $\Spec(k) \to \mathcal{Z}$.
\end{lemma}

\begin{proof}
By
Properties of Stacks, Lemma \ref{stacks-properties-lemma-unique-point-better}
there exists a field $k$ and a surjective, flat, locally finitely presented
morphism $\Spec(k) \to \mathcal{Z}$. Set $U = \Spec(k)$ and
$R = U \times_\mathcal{Z} U$ so we obtain a groupoid in algebraic spaces
$(U, R, s, t, c)$, see
Algebraic Stacks, Lemma
\ref{algebraic-lemma-criterion-map-representable-spaces-fibred-in-groupoids}.
Note that by
Algebraic Stacks, Remark \ref{algebraic-remark-flat-fp-presentation}
we have an equivalence
$$
f_{can} : [U/R] \longrightarrow \mathcal{Z}
$$
The projections $s, t : R \to U$ are locally of finite presentation.
As $\mathcal{Z}$ is DM we see that the stabilizer group algebraic space
$$
G = U \times_{U \times U} R = U \times_{U \times U} (U \times_\mathcal{Z} U) =
U \times_{\mathcal{Z} \times \mathcal{Z}, \Delta_\mathcal{Z}} \mathcal{Z}
$$
is unramified over $U$. In particular $\dim(G) = 0$ and by
More on Groupoids in Spaces, Lemma
\ref{spaces-more-groupoids-lemma-groupoid-on-field-dimension-equal-stabilizer}
we have $\dim(R) = 0$. This implies that $R$ is a scheme, see
Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-locally-finite-type-dim-zero}.
By
Varieties, Lemma \ref{varieties-lemma-algebraic-scheme-dim-0}
we see that $R$ (and also $G$) is the disjoint union of spectra of
Artinian local rings finite over $k$ via either $s$ or $t$. Let
$P = \Spec(A) \subset R$ be the open and
closed subscheme whose underlying point is the identity $e$ of the groupoid
scheme $(U, R, s, t, c)$. As
$s \circ e = t \circ e = \text{id}_{\Spec(k)}$ we see that $A$
is an Artinian local ring whose residue field is identified with $k$
via either $s^\sharp : k \to A$ or $t^\sharp : k \to A$.
Note that $s, t : \Spec(A) \to \Spec(k)$
are finite (by the lemma referenced above). Since
$G \to \Spec(k)$ is unramified we see that
$$
G \cap P = P \times_{U \times U} U = \Spec(A \otimes_{k \otimes k} k)
$$
is unramified over $k$. On the other hand $A \otimes_{k \otimes k} k$
is local as a quotient of $A$ and surjects onto $k$. We conclude that
$A \otimes_{k \otimes k} k = k$. It follows that $P \to U \times U$
is universally injective (as $P$ has only one point with residue field $k$),
unramified (by the computation of the fibre over the unique image point
above), and of finite type (because $s, t$ are) hence a monomorphism (see
\'Etale Morphisms, Lemma
\ref{etale-lemma-universally-injective-unramified}).
Thus $s|_P, t|_P : P \to U$ define a finite flat equivalence
relation. Thus we may apply
Groupoids, Proposition \ref{groupoids-proposition-finite-flat-equivalence}
to conclude that $U/P$ exists and is a scheme $\overline{U}$.
Moreover, $U \to \overline{U}$ is finite locally free and
$P = U \times_{\overline{U}} U$.
In fact $\overline{U} = \Spec(k_0)$ where $k_0 \subset k$ is the
ring of $R$-invariant functions. As $k$ is a field it follows
from the definition
Groupoids, Equation (\ref{groupoids-equation-invariants})
that $k_0$ is a field.

\medskip\noindent
We claim that
\begin{equation}
\label{equation-etale-covering}
\Spec(k_0) = \overline{U} = U/P \to [U/R] = \mathcal{Z}
\end{equation}
is the desired surjective \'etale morphism. It follows from
Properties of Stacks, Lemma \ref{stacks-properties-lemma-flat-cover-by-field}
that this morphism is surjective. Thus it suffices to show that
(\ref{equation-etale-covering}) is \'etale\footnote{We urge the
reader to find his/her own proof of this fact. In fact the argument
has a lot in common with the final argument of the proof of
Bootstrap, Theorem \ref{bootstrap-theorem-final-bootstrap}
hence probably should be isolated into its own lemma somewhere.}.
Instead of proving the \'etaleness
directly we first apply
Bootstrap, Lemma \ref{bootstrap-lemma-divide-subgroupoid}
to see that there exists a groupoid scheme
$(\overline{U}, \overline{R}, \overline{s}, \overline{t}, \overline{c})$
such that $(U, R, s, t, c)$ is the restriction of
$(\overline{U}, \overline{R}, \overline{s}, \overline{t}, \overline{c})$
via the quotient morphism $U \to \overline{U}$.
(We verified all the hypothesis of the lemma above except for the assertion
that $j : R \to U \times U$ is separated and locally quasi-finite
which follows from the fact that $R$ is a separated scheme locally quasi-finite
over $k$.) Since $U \to \overline{U}$ is finite locally free
we see that $[U/R] \to [\overline{U}/\overline{R}]$ is an equivalence, see
Groupoids in Spaces,
Lemma \ref{spaces-groupoids-lemma-quotient-stack-restrict-equivalence}.

\medskip\noindent
Note that $s, t$ are the base changes of the morphisms
$\overline{s}, \overline{t}$ by $U \to \overline{U}$.
As $\{U \to \overline{U}\}$ is an fppf covering we conclude
$\overline{s}, \overline{t}$ are flat, locally of finite presentation, and
locally quasi-finite, see
Descent, Lemmas \ref{descent-lemma-descending-property-flat},
\ref{descent-lemma-descending-property-locally-finite-presentation}, and
\ref{descent-lemma-descending-property-quasi-finite}.
Consider the commutative diagram
$$
\xymatrix{
U \times_{\overline{U}} U \ar@{=}[r] \ar[rd] & P \ar[r] \ar[d] & R \ar[d] \\
& \overline{U} \ar[r]^{\overline{e}} & \overline{R}
}
$$
It is a general fact about restrictions that the outer four corners
form a cartesian diagram. By the equality we see the inner square is
cartesian. Since $P$ is open in $R$ we conclude that $\overline{e}$
is an open immersion by
Descent, Lemma \ref{descent-lemma-descending-property-open-immersion}.

\medskip\noindent
But of course, if $\overline{e}$ is an open immersion and
$\overline{s}, \overline{t}$ are flat and locally of finite presentation
then the morphisms $\overline{t}, \overline{s}$ are \'etale.
For example you can see this by applying
More on Groupoids, Lemma \ref{more-groupoids-lemma-sheaf-differentials}
which shows that $\Omega_{\overline{R}/\overline{U}} = 0$
implies that $\overline{s}, \overline{t} : \overline{R} \to \overline{U}$
is unramified (see
Morphisms, Lemma \ref{morphisms-lemma-unramified-omega-zero}),
which in turn implies that $\overline{s}, \overline{t}$ are \'etale
(see
Morphisms, Lemma \ref{morphisms-lemma-flat-unramified-etale}).
Hence $\mathcal{Z} = [\overline{U}/\overline{R}]$ is an \'etale
presentation of the algebraic stack $\mathcal{Z}$ and we conclude that
$\overline{U} \to \mathcal{Z}$ is \'etale by
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-check-property-covering}.
\end{proof}

\begin{lemma}
\label{lemma-etale-at-point}
Let $\mathcal{X}$ be an algebraic stack. Consider a cartesian diagram
$$
\xymatrix{
U \ar[d] & F \ar[l]^p \ar[d] \\
\mathcal{X} & \Spec(k) \ar[l]
}
$$
where $U$ is an algebraic space, $k$ is a field, and $U \to \mathcal{X}$
is flat and locally of finite presentation. Let $z \in |F|$ be such that
$F \to \Spec(k)$ is unramified at $z$. Then, after replacing $U$ by
an open subspace containing $p(z)$, the morphism
$$
U \longrightarrow \mathcal{X}
$$
is \'etale.
\end{lemma}

\begin{proof}
Since $f : U \to \mathcal{X}$ is flat and locally of finite presentation
there exists a maximal open $W(f) \subset U$ such that the restriction
$f|_{W(f)} : W(f) \to \mathcal{X}$ is \'etale, see
Properties of Stacks, Remark
\ref{stacks-properties-remark-local-source-apply}
(\ref{stacks-properties-item-etale}).
Hence all we need to do is prove that $p(z)$ is a point of $W(f)$.
Moreover, the remark referenced above also shows the formation of $W(f)$
commutes with arbitrary base change by a morphism which is representable
by algebraic spaces. Hence it suffices to show that the morphism
$F \to \Spec(k)$ is \'etale at $z$. Since it is flat and locally
of finite presentation as a base change of $U \to \mathcal{X}$ and since
$F \to \Spec(k)$ is unramified at $z$ by assumption, this follows
from
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-unramified-flat-lfp-etale}.
\end{proof}

\noindent
A DM stack is a Deligne-Mumford stack.

\begin{theorem}
\label{theorem-DM}
Let $\mathcal{X}$ be an algebraic stack. The following are equivalent
\begin{enumerate}
\item $\mathcal{X}$ is DM,
\item $\mathcal{X}$ is Deligne-Mumford, and
\item there exists a scheme $W$ and a surjective \'etale
morphism $W \to \mathcal{X}$.
\end{enumerate}
\end{theorem}

\begin{proof}
Recall that (3) is the definition of (2), see
Algebraic Stacks, Definition \ref{algebraic-definition-deligne-mumford}.
The implication (3) $\Rightarrow$ (1) is
Lemma \ref{lemma-properties-covering-imply-diagonal}.
Assume (1). Let $x \in |\mathcal{X}|$ be a finite type point.
We will produce a scheme over $\mathcal{X}$ which ``works'' in a
neighbourhood of $x$. At the end of the proof we will take the disjoint
union of all of these to conclude.

\medskip\noindent
By
Lemma \ref{lemma-point-finite-type-monomorphism}
the residual gerbe $\mathcal{Z}_x$ of $\mathcal{X}$ at $x$ exists and
$\mathcal{Z}_x \to \mathcal{X}$ is locally of finite type. By
Lemma \ref{lemma-separation-properties-residual-gerbe}
the algebraic stack $\mathcal{Z}_x$ is DM. By
Lemma \ref{lemma-DM-residual-gerbe}
there exists a field $k$ and a surjective \'etale morphism
$z : \Spec(k) \to \mathcal{Z}_x$.
In particular the composition $x : \Spec(k) \to \mathcal{X}$
is locally of finite type (by
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-composition-finite-type} and
\ref{spaces-morphisms-lemma-etale-locally-finite-type}).

\medskip\noindent
Pick a scheme $U$ and a smooth morphism $U \to \mathcal{X}$ such that
$x$ is in the image of $|U| \to |\mathcal{X}|$.
Consider the following fibre square
$$
\xymatrix{
U \ar[d] & F  \ar[l] \ar[d] \\
\mathcal{X} & \Spec(k) \ar[l]_-x
}
$$
in other words $F = U \times_{\mathcal{X}, x} \Spec(k)$. By
Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian}
we see that $F$ is nonempty.
As $\mathcal{Z}_x \to \mathcal{X}$ is a monomorphism we have
$$
\Spec(k) \times_{z, \mathcal{Z}_x, z} \Spec(k)
=
\Spec(k) \times_{x, \mathcal{X}, x} \Spec(k)
$$
with \'etale projection maps to $\Spec(k)$ by construction of $z$.
Since
$$
F \times_U F =
(\Spec(k) \times_\mathcal{X} \Spec(k))
\times_{\Spec(k)} F
$$
we see that the projections maps $F \times_U F \to F$ are \'etale as well.
It follows that $\Delta_{F/U} : F \to F \times_U F$ is \'etale (see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-etale-permanence}).
By
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-etale-universally-injective-open}
this implies that $\Delta_{F/U}$ is an open immersion, which finally
implies by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-diagonal-unramified-morphism}
that $F \to U$ is unramified.

\medskip\noindent
Pick a nonempty affine scheme $V$ and an \'etale morphism $V \to F$.
(This could be avoided by working directly with $F$, but it seems easier
to explain what's going on by doing so.) Picture
$$
\xymatrix{
U \ar[d] & F  \ar[l] \ar[d] & V \ar[l] \ar[ld] \\
\mathcal{X} & \Spec(k) \ar[l]_-x
}
$$
Then $V \to \Spec(k)$ is a smooth morphism of schemes and $V \to U$ is an
unramified morphism of schemes (see
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-composition-smooth} and
\ref{spaces-morphisms-lemma-composition-unramified}).
Pick a closed point $v \in V$ with $k \subset \kappa(v)$ finite separable, see
Varieties, Lemma \ref{varieties-lemma-smooth-separable-closed-points-dense}.
Let $u \in U$ be the image point. The local ring
$\mathcal{O}_{V, v}$ is regular (see
Varieties, Lemma \ref{varieties-lemma-smooth-regular})
and the local ring homomorphism
$$
\varphi : \mathcal{O}_{U, u} \longrightarrow \mathcal{O}_{V, v}
$$
coming from the morphism $V \to U$ is such that
$\varphi(\mathfrak m_u)\mathcal{O}_{V, v} = \mathfrak m_v$, see
Morphisms, Lemma \ref{morphisms-lemma-unramified-at-point}.
Hence we can find $f_1, \ldots, f_d \in \mathcal{O}_{U, u}$
such that the images $\varphi(f_1), \ldots, \varphi(f_d)$
form a basis for $\mathfrak m_v/\mathfrak m_v^2$ over $\kappa(v)$.
Since $\mathcal{O}_{V, v}$ is a regular local ring this implies
that $\varphi(f_1), \ldots, \varphi(f_d)$ form a regular sequence
in $\mathcal{O}_{V, v}$ (see
Algebra, Lemma \ref{algebra-lemma-regular-ring-CM}).
After replacing $U$ by an open neighbourhood of $u$ we may assume
$f_1, \ldots, f_d \in \Gamma(U, \mathcal{O}_U)$. After replacing
$U$ by a possibly even smaller open neighbourhood of $u$ we may
assume that $V(f_1, \ldots, f_d) \to \mathcal{X}$ is flat and
locally of finite presentation, see
Lemma \ref{lemma-slice}.
By construction
$$
V(f_1, \ldots, f_d) \times_\mathcal{X} \Spec(k)
\longleftarrow
V(f_1, \ldots, f_d) \times_\mathcal{X} V
$$
is \'etale and $V(f_1, \ldots, f_d) \times_\mathcal{X} V$
is the closed subscheme $T \subset V$ cut out by $f_1|_V, \ldots, f_d|_V$.
Hence by construction $v \in T$ and
$$
\mathcal{O}_{T, v} =
\mathcal{O}_{V, v}/(\varphi(f_1), \ldots, \varphi(f_d)) = \kappa(v)
$$
a finite separable extension of $k$. It follows that $T \to \Spec(k)$
is unramified at $v$, see
Morphisms, Lemma \ref{morphisms-lemma-unramified-at-point}.
By definition of an unramified morphism of algebraic spaces this means that
$V(f_1, \ldots, f_d) \times_\mathcal{X} \Spec(k) \to \Spec(k)$
is unramified at the image of $v$ in
$V(f_1, \ldots, f_d) \times_\mathcal{X} \Spec(k)$.
Applying
Lemma \ref{lemma-etale-at-point}
we see that on shrinking $U$ to yet another open neighbourhood of $u$
the morphism $V(f_1, \ldots, f_d) \to \mathcal{X}$ is \'etale.

\medskip\noindent
We conclude that for every finite type point $x$ of $\mathcal{X}$ there
exists an \'etale morphism $f_x : W_x \to \mathcal{X}$ with $x$ in the
image of $|f_x|$. Set $W = \coprod_x W_x$ and $f = \coprod f_x$. Then $f$
is \'etale. In particular the image of $|f|$ is open, see
Properties of Stacks, Lemma \ref{stacks-properties-lemma-topology-points}.
By construction the image contains all finite type points of $\mathcal{X}$,
hence $f$ is surjective by
Lemma \ref{lemma-enough-finite-type-points} (and
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-characterize-surjective}).
\end{proof}

\noindent
Here is a useful corollary which tells us that the ``fibres'' of
a DM morphism of algebraic stacks are Deligne-Mumford.

\begin{lemma}
\label{lemma-DM}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a DM morphism of algebraic
stacks. Then
\begin{enumerate}
\item For every DM algebraic stack $\mathcal{Z}$ and morphism
$\mathcal{Z} \to \mathcal{Y}$ there exists a scheme and
a surjective \'etale morphism
$U \to \mathcal{X} \times_\mathcal{Y} \mathcal{Z}$.
\item For every algebraic space $Z$ and morphism
$Z \to \mathcal{Y}$ there exists a scheme and
a surjective \'etale morphism
$U \to \mathcal{X} \times_\mathcal{Y} Z$.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1). As $f$ is DM we see that the base change
$\mathcal{X} \times_\mathcal{Y} \mathcal{Z} \to \mathcal{Z}$ is DM
by Lemma \ref{lemma-base-change-separated}.
Since $\mathcal{Z}$ is DM this implies that
$\mathcal{X} \times_\mathcal{Y} \mathcal{Z}$ is DM
by Lemma \ref{lemma-separated-over-separated}. Hence there exists a
scheme $U$ and a surjective \'etale morphism
$U \to \mathcal{X} \times_\mathcal{Y} \mathcal{Z}$, see
Theorem \ref{theorem-DM}.
Part (2) is a special case of (1) since an algebraic space
(when viewed as an algebraic stack) is DM by
Lemma \ref{lemma-trivial-implications}.
\end{proof}






\section{The Deligne-Mumford locus}
\label{section-DM}

\noindent
Every algebraic stack has a largest open substack which is a
Deligne-Mumford stack; this is more or less clear but we also
write out the proof below. Of course this substack may be empty,
for example if $X = [\Spec(\mathbf{Z})/\mathbf{G}_{m, \mathbf{Z}}]$.
Below we will characterize the points of the DM locus.

\begin{lemma}
\label{lemma-open-DM-locus}
Let $\mathcal{X}$ be an algebraic stack. There exist open substacks
$$
\mathcal{X}'' \subset \mathcal{X}' \subset \mathcal{X}
$$
such that $\mathcal{X}''$ is DM, $\mathcal{X}'$ is quasi-DM, and
such that these are the largest open substacks with these properties.
\end{lemma}

\begin{proof}
All we are really saying here is that if $\mathcal{U} \subset \mathcal{X}$
and $\mathcal{V} \subset \mathcal{X}$ are open substacks which are DM,
then the open substack $\mathcal{W} \subset \mathcal{X}$
with $|\mathcal{W}| = |\mathcal{U}| \cup |\mathcal{V}|$
is DM as well. (Similarly for quasi-DM.) Although this is a cheat, let
us use Theorem \ref{theorem-DM} to prove this.
By that theorem we can choose
schemes $U$ and $V$ and surjective \'etale morphisms
$U \to \mathcal{U}$ and $V \to \mathcal{V}$.
Then of course $U \amalg V \to \mathcal{W}$ is surjective and \'etale.
The quasi-DM case is proven by exactly the same method using
Theorem \ref{theorem-quasi-DM}.
\end{proof}

\begin{lemma}
\label{lemma-points-DM-locus}
Let $\mathcal{X}$ be an algebraic stack. Let $x \in |\mathcal{X}|$
correspond to $x : \Spec(k) \to \mathcal{X}$. Let $G_x/k$
be the automorphism group algebraic space of $x$. Then
\begin{enumerate}
\item  $x$ is in the DM locus of $\mathcal{X}$
if and only if $G_x \to \Spec(k)$ is unramified, and
\item $x$ is in the quasi-DM locus of $\mathcal{X}$
if and only if $G_x \to \Spec(k)$ is locally quasi-finite.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (2). Choose a scheme $U$ and a surjective smooth morphism
$U \to \mathcal{X}$. Consider the fibre product
$$
\xymatrix{
G \ar[r] \ar[d] & \mathcal{I}_\mathcal{X} \ar[d] \\
U \ar[r] & \mathcal{X}
}
$$
Recall that $G$ is the automorphism group algebraic space of
$U \to \mathcal{X}$. By Groupoids in Spaces, Lemma
\ref{spaces-groupoids-lemma-open-over-which-unramified-or-lqf}
there is a maximal open subscheme $U' \subset U$
such that $G_{U'} \to U'$ is locally quasi-finite.
Moreover, formation of $U'$ commutes with arbitrary
base change. In particular the two inverse images of $U'$
in $R = U \times_\mathcal{X} U$ are the same open subspace of $R$
(since after all the two maps $R \to \mathcal{X}$ are isomorphic
and hence have isomorphic automorphism group spaces).
Hence $U'$ is the inverse image of an open substack
$\mathcal{X}' \subset \mathcal{X}$ by
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-substacks-presentation}
and we have a cartesian diagram
$$
\xymatrix{
G_{U'} \ar[r] \ar[d] & \mathcal{I}_{\mathcal{X}'} \ar[d] \\
U' \ar[r] & \mathcal{X}'
}
$$
Thus the morphism $\mathcal{I}_{\mathcal{X}'} \to \mathcal{X}'$
is locally quasi-finite and we conclude that
$\mathcal{X}'$ is quasi-DM by Lemma \ref{lemma-diagonal-diagonal}
part (5). On the other hand, if $\mathcal{W} \subset \mathcal{X}$
is an open substack which is quasi-DM, then the inverse image
$W \subset U$ of $\mathcal{W}$ must be contained in $U'$ by our
construction of $U'$ since
$\mathcal{I}_\mathcal{W} =
\mathcal{W} \times_\mathcal{X} \mathcal{I}_\mathcal{X}$
is locally quasi-finite over $\mathcal{W}$.
Thus $\mathcal{X}'$ is the quasi-DM locus.
Finally, choose a field extension $K/k$ and a $2$-commutative
diagram
$$
\xymatrix{
\Spec(K) \ar[r] \ar[d] & \Spec(k) \ar[d]^x \\
U \ar[r] & \mathcal{X}
}
$$
Then we find an isomorphism
$G_x \times_{\Spec(k)} \Spec(K) \cong G \times_U \Spec(K)$
of group algebraic spaces over $K$. Hence $G_x$ is locally quasi-finite
over $k$ if and only if $\Spec(K) \to U$ maps into $U'$
(use the commutation of formation of $U'$ and
Groupoids in Spaces, Lemma
\ref{spaces-groupoids-lemma-open-over-which-unramified-or-lqf}
applied to $\Spec(K) \to \Spec(k)$ and $G_x$ to see this).
This finishes the proof of (2). The proof of (1) is
exactly the same.
\end{proof}









\section{Locally quasi-finite morphisms}
\label{section-locally-quasi-finite}

\noindent
The property ``locally quasi-finite'' of morphisms of algebraic spaces
is not smooth local on the source-and-target so we cannot use the material in
Section \ref{section-local-source-target}
to define locally quasi-finite morphisms of algebraic stacks.
We do already know what it means for a morphism of algebraic stacks
representable by algebraic spaces to be locally quasi-finite, see
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}.
To find a condition suitable for general morphisms we make the following
observation.

\begin{lemma}
\label{lemma-representable-by-spaces-quasi-finite}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Assume $f$ is representable by algebraic spaces.
The following are equivalent
\begin{enumerate}
\item $f$ is locally quasi-finite (as in Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}), and
\item $f$ is locally of finite type and for every morphism
$\Spec(k) \to \mathcal{Y}$ where $k$ is a field the
space $|\Spec(k) \times_\mathcal{Y} \mathcal{X}|$ is discrete.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1). In this case the morphism of algebraic spaces
$\mathcal{X}_k \to \Spec(k)$ is locally quasi-finite as a base change
of $f$. Hence $|\mathcal{X}_k|$ is discrete by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite}.
Conversely, assume (2). Pick a surjective smooth morphism
$V \to \mathcal{Y}$ where $V$ is a scheme. It suffices to show that the
morphism of algebraic spaces $V \times_\mathcal{Y} \mathcal{X} \to V$
is locally quasi-finite, see
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-check-property-covering}.
The morphism $V \times_\mathcal{Y} \mathcal{X} \to V$ is locally of finite
type by assumption. For any morphism $\Spec(k) \to V$ where $k$ is a
field
$$
\Spec(k) \times_V (V \times_\mathcal{Y} \mathcal{X}) =
\Spec(k) \times_\mathcal{Y} \mathcal{X}
$$
has a discrete space of points by assumption. Hence we conclude that
$V \times_\mathcal{Y} \mathcal{X} \to V$ is locally quasi-finite by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite}.
\end{proof}

\noindent
A morphism of algebraic stacks which is representable by algebraic spaces
is quasi-DM, see
Lemma \ref{lemma-trivial-implications}.
Combined with the lemma above we see that the following definition
does not conflict with the already existing notion in the case
of morphisms representable by algebraic spaces.

\begin{definition}
\label{definition-locally-quasi-finite}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $f$ is {\it locally quasi-finite} if $f$ is quasi-DM, locally of
finite type, and for every morphism $\Spec(k) \to \mathcal{Y}$
where $k$ is a field the space $|\mathcal{X}_k|$ is discrete.
\end{definition}

\noindent
The condition that $f$ be quasi-DM is natural. For example, let $k$ be
a field and consider the morphism
$\pi : [\Spec(k)/\mathbf{G}_m] \to \Spec(k)$
which has singleton fibres and is locally of finite type. As we will see
later this morphism is smooth of relative dimension $-1$, and we'd
like our locally quasi-finite morphisms to have relative dimension $0$.
Also, note that the section $\Spec(k) \to [\Spec(k)/\mathbf{G}_m]$
does not have discrete fibres, hence is not locally quasi-finite, and we'd
like to have the following permanence property for locally quasi-finite
morphisms: If $f : \mathcal{X} \to \mathcal{X}'$ is a morphism of algebraic
stacks locally quasi-finite over the algebraic stack $\mathcal{Y}$, then
$f$ is locally quasi-finite (in fact something a bit stronger holds, see
Lemma \ref{lemma-locally-quasi-finite-permanence}).

\medskip\noindent
Another justification for the definition above is
Lemma \ref{lemma-characterize-locally-quasi-finite}
below which characterizes being locally quasi-finite in terms of the
existence of suitable ``presentations'' or ``coverings'' of
$\mathcal{X}$ and $\mathcal{Y}$.

\begin{lemma}
\label{lemma-base-change-locally-quasi-finite}
A base change of a locally quasi-finite morphism is locally quasi-finite.
\end{lemma}

\begin{proof}
We have seen this for quasi-DM morphisms in
Lemma \ref{lemma-base-change-separated}
and for locally finite type morphisms in
Lemma \ref{lemma-base-change-finite-type}.
It is immediate that the condition on fibres is inherited by a base change.
\end{proof}

\begin{lemma}
\label{lemma-locally-quasi-finite-over-field}
Let $\mathcal{X} \to \Spec(k)$ be a locally quasi-finite morphism
where $\mathcal{X}$ is an algebraic stack and $k$ is a field.
Let $f : V \to \mathcal{X}$ be a locally quasi-finite morphism where
$V$ is a scheme. Then $V \to \Spec(k)$ is locally quasi-finite.
\end{lemma}

\begin{proof}
By
Lemma \ref{lemma-composition-finite-type}
we see that $V \to \Spec(k)$ is locally of finite type.
Assume, to get a contradiction, that $V \to \Spec(k)$ is not
locally quasi-finite. Then there exists a nontrivial specialization
$v \leadsto v'$ of points of $V$, see
Morphisms, Lemma \ref{morphisms-lemma-quasi-finite-at-point-characterize}.
In particular $\text{trdeg}_k(\kappa(v)) > \text{trdeg}_k(\kappa(v'))$, see
Morphisms, Lemma \ref{morphisms-lemma-dimension-fibre-specialization}.
Because $|\mathcal{X}|$ is discrete we see that $|f|(v) = |f|(v')$.
Consider $R = V \times_\mathcal{X} V$. Then $R$ is an algebraic space
and the projections $s, t : R \to V$ are locally quasi-finite as base
changes of $V \to \mathcal{X}$ (which is representable by algebraic spaces
so this follows from the discussion in
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}).
By
Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian}
we see that there exists an $r \in |R|$ such that $s(r) = v$ and $t(r) = v'$.
By
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-compare-tr-deg}
we see that the transcendence degree of $v/k$ is equal to the
transcendence degree of $r/k$ is equal to the transcendence degree of
$v'/k$. This contradiction proves the lemma.
\end{proof}

\begin{lemma}
\label{lemma-composition-locally-quasi-finite}
A composition of a locally quasi-finite morphisms is locally quasi-finite.
\end{lemma}

\begin{proof}
We have seen this for quasi-DM morphisms in
Lemma \ref{lemma-composition-separated}
and for locally finite type morphisms in
Lemma \ref{lemma-composition-finite-type}.
Let $\mathcal{X} \to \mathcal{Y}$ and $\mathcal{Y} \to \mathcal{Z}$
be locally quasi-finite. Let $k$ be a field and let
$\Spec(k) \to \mathcal{Z}$ be a morphism.
It suffices to show that $|\mathcal{X}_k|$ is discrete. By
Lemma \ref{lemma-base-change-locally-quasi-finite}
the morphisms $\mathcal{X}_k \to \mathcal{Y}_k$
and $\mathcal{Y}_k \to \Spec(k)$ are locally quasi-finite.
In particular we see that $\mathcal{Y}_k$ is
a quasi-DM algebraic stack, see
Lemma \ref{lemma-separated-implies-morphism-separated}.
By
Theorem \ref{theorem-quasi-DM}
we can find a scheme $V$ and a surjective, flat, locally finitely presented,
locally quasi-finite morphism $V \to \mathcal{Y}_k$. By
Lemma \ref{lemma-locally-quasi-finite-over-field}
we see that $V$ is locally quasi-finite over $k$, in particular
$|V|$ is discrete. The morphism
$V \times_{\mathcal{Y}_k} \mathcal{X}_k \to \mathcal{X}_k$ is
surjective, flat, and locally of finite presentation hence
$|V \times_{\mathcal{Y}_k} \mathcal{X}_k| \to |\mathcal{X}_k|$
is surjective and open. Thus it suffices to show that
$|V \times_{\mathcal{Y}_k} \mathcal{X}_k|$ is discrete.
Note that $V$ is a disjoint union of spectra of Artinian local
$k$-algebras $A_i$ with residue fields $k_i$, see
Varieties, Lemma \ref{varieties-lemma-algebraic-scheme-dim-0}.
Thus it suffices to show that each
$$
|\Spec(A_i) \times_{\mathcal{Y}_k} \mathcal{X}_k| =
|\Spec(k_i) \times_{\mathcal{Y}_k} \mathcal{X}_k| =
|\Spec(k_i) \times_\mathcal{Y} \mathcal{X}|
$$
is discrete, which follows from the assumption that
$\mathcal{X} \to \mathcal{Y}$ is locally quasi-finite.
\end{proof}

\noindent
Before we characterize locally quasi-finite morphisms in terms of coverings
we do it for quasi-DM morphisms.

\begin{lemma}
\label{lemma-characterize-quasi-DM}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The following are equivalent
\begin{enumerate}
\item $f$ is quasi-DM,
\item for any morphism $V \to \mathcal{Y}$ with $V$ an algebraic space
there exists a surjective, flat, locally finitely presented, locally
quasi-finite morphism $U \to \mathcal{X} \times_\mathcal{Y} V$ where
$U$ is an algebraic space, and
\item there exist algebraic spaces $U$, $V$ and a morphism
$V \to \mathcal{Y}$ which is surjective, flat, and
locally of finite presentation, and a morphism
$U \to \mathcal{X} \times_\mathcal{Y} V$ which is surjective, flat,
locally of finite presentation, and locally quasi-finite.
\end{enumerate}
\end{lemma}

\begin{proof}
The implication (2) $\Rightarrow$ (3) is immediate.

\medskip\noindent
Assume (1) and let $V \to \mathcal{Y}$ be as in (2). Then
$\mathcal{X} \times_\mathcal{Y} V \to V$ is quasi-DM, see
Lemma \ref{lemma-base-change-separated}.
By
Lemma \ref{lemma-trivial-implications}
the algebraic space $V$ is DM, hence quasi-DM. Thus
$\mathcal{X} \times_\mathcal{Y} V$ is quasi-DM by
Lemma \ref{lemma-separated-over-separated}.
Hence we may apply
Theorem \ref{theorem-quasi-DM}
to get the morphism $U \to \mathcal{X} \times_\mathcal{Y} V$
as in (2).

\medskip\noindent
Assume (3). Let $V \to \mathcal{Y}$ and
$U \to \mathcal{X} \times_\mathcal{Y} V$ be as in (3).
To prove that $f$ is quasi-DM it suffices to show that
$\mathcal{X} \times_\mathcal{Y} V \to V$ is quasi-DM, see
Lemma \ref{lemma-check-separated-covering}.
By
Lemma \ref{lemma-properties-covering-imply-diagonal}
we see that $\mathcal{X} \times_\mathcal{Y} V$ is quasi-DM.
Hence $\mathcal{X} \times_\mathcal{Y} V \to V$ is quasi-DM by
Lemma \ref{lemma-separated-implies-morphism-separated}
and (1) holds. This finishes the proof of the lemma.
\end{proof}

\begin{lemma}
\label{lemma-characterize-locally-quasi-finite}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The following are equivalent
\begin{enumerate}
\item $f$ is locally quasi-finite,
\item $f$ is quasi-DM and for any morphism $V \to \mathcal{Y}$ with $V$
an algebraic space and any locally quasi-finite morphism
$U \to \mathcal{X} \times_\mathcal{Y} V$ where $U$ is an algebraic space
the morphism $U \to V$ is locally quasi-finite,
\item for any morphism $V \to \mathcal{Y}$ from an algebraic space $V$
there exists a surjective, flat, locally finitely presented, and locally
quasi-finite morphism $U \to \mathcal{X} \times_\mathcal{Y} V$ where
$U$ is an algebraic space such that $U \to V$ is locally quasi-finite,
\item there exists algebraic spaces $U$, $V$, a surjective, flat,
and locally of finite presentation morphism $V \to \mathcal{Y}$,
and a morphism $U \to \mathcal{X} \times_\mathcal{Y} V$ which
is surjective, flat, locally of finite presentation, and
locally quasi-finite such that $U \to V$ is locally quasi-finite.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1). Then $f$ is quasi-DM by assumption. Let
$V \to \mathcal{Y}$ and $U \to \mathcal{X} \times_\mathcal{Y} V$
be as in (2). By
Lemma \ref{lemma-composition-locally-quasi-finite}
the composition $U \to \mathcal{X} \times_\mathcal{Y} V \to V$ is
locally quasi-finite. Thus (1) implies (2).

\medskip\noindent
Assume (2). Let $V \to \mathcal{Y}$ be as in (3). By
Lemma \ref{lemma-characterize-quasi-DM}
we can find an algebraic space $U$ and a surjective, flat, locally
finitely presented, locally quasi-finite morphism
$U \to \mathcal{X} \times_\mathcal{Y} V$. By (2) the composition
$U \to V$ is locally quasi-finite. Thus (2) implies (3).

\medskip\noindent
It is immediate that (3) implies (4).

\medskip\noindent
Assume (4). We will prove (1) holds, which finishes the proof. By
Lemma \ref{lemma-characterize-quasi-DM}
we see that $f$ is quasi-DM. To prove that $f$ is locally of finite type
it suffices to prove that $g : \mathcal{X} \times_\mathcal{Y} V \to V$ is
locally of finite type, see
Lemma \ref{lemma-check-finite-type-covering}.
Then it suffices to check that $g$ precomposed with
$h : U \to \mathcal{X} \times_\mathcal{Y} V$ is locally of finite type, see
Lemma \ref{lemma-check-finite-type-precompose}.
Since $g \circ h : U \to V$ was assumed to be locally quasi-finite
this holds, hence $f$ is locally of finite type.
Finally, let $k$ be a field and let $\Spec(k) \to \mathcal{Y}$
be a morphism. Then $V \times_\mathcal{Y} \Spec(k)$ is
a nonempty algebraic space which is locally of finite presentation
over $k$. Hence we can find a finite extension $k'/k$ and
a morphism $\Spec(k') \to V$ such that
$$
\xymatrix{
\Spec(k') \ar[r] \ar[d] & V \ar[d] \\
\Spec(k) \ar[r] & \mathcal{Y}
}
$$
commutes (details omitted). Then $\mathcal{X}_{k'} \to \mathcal{X}_k$
is representable (by schemes), surjective, and finite locally free. In
particular $|\mathcal{X}_{k'}| \to |\mathcal{X}_k|$ is surjective and open.
Thus it suffices to prove that $|\mathcal{X}_{k'}|$ is discrete. Since
$$
U \times_V \Spec(k') =
U \times_{\mathcal{X} \times_\mathcal{Y} V} \mathcal{X}_{k'}
$$
we see that $U \times_V \Spec(k') \to \mathcal{X}_{k'}$ is
surjective, flat, and locally of finite presentation (as a base change
of $U \to \mathcal{X} \times_\mathcal{Y} V$). Hence
$|U \times_V \Spec(k')| \to |\mathcal{X}_{k'}|$ is surjective and
open. Thus it suffices to show that $|U \times_V \Spec(k')|$ is
discrete. This follows from the fact that $U \to V$ is locally
quasi-finite (either by our definition above or from the original definition
for morphisms of algebraic spaces, via
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite}).
\end{proof}

\begin{lemma}
\label{lemma-locally-quasi-finite-permanence}
Let $\mathcal{X} \to \mathcal{Y} \to \mathcal{Z}$ be morphisms
of algebraic stacks. Assume that $\mathcal{X} \to \mathcal{Z}$
is locally quasi-finite and $\mathcal{Y} \to \mathcal{Z}$ is quasi-DM.
Then $\mathcal{X} \to \mathcal{Y}$ is locally quasi-finite.
\end{lemma}

\begin{proof}
Write $\mathcal{X} \to \mathcal{Y}$ as the composition
$$
\mathcal{X} \longrightarrow
\mathcal{X} \times_\mathcal{Z} \mathcal{Y} \longrightarrow
\mathcal{Y}
$$
The second arrow is locally quasi-finite as a base change of
$\mathcal{X} \to \mathcal{Z}$, see
Lemma \ref{lemma-base-change-locally-quasi-finite}.
The first arrow is locally quasi-finite by
Lemma \ref{lemma-semi-diagonal}
as $\mathcal{Y} \to \mathcal{Z}$ is quasi-DM.
Hence $\mathcal{X} \to \mathcal{Y}$ is locally quasi-finite by
Lemma \ref{lemma-composition-locally-quasi-finite}.
\end{proof}

















\section{Quasi-finite morphisms}
\label{section-quasi-finite}

\noindent
We have defined ``locally quasi-finite'' morphisms of algebraic stacks
in Section \ref{section-locally-quasi-finite} and ``quasi-compact'' morphisms
of algebraic stacks in Section \ref{section-quasi-compact}. Since a morphism
of algebraic spaces is by definition quasi-finite if and only if it is both
locally quasi-finite and quasi-compact (Morphisms of Spaces, Definition
\ref{spaces-morphisms-definition-locally-quasi-finite}),
we may define what it means for a morphism of algebraic stacks to be
quasi-finite as follows and it agrees with the already existing notion defined
in Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}
when the morphism is representable by algebraic spaces.

\begin{definition}
\label{definition-quasi-finite}
\begin{reference}
\cite{rydh_approx}
\end{reference}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $f$ is {\it quasi-finite} if $f$ is locally quasi-finite
(Definition \ref{definition-locally-quasi-finite})
and quasi-compact (Definition \ref{definition-quasi-compact}).
\end{definition}

\begin{lemma}
\label{lemma-composition-quasi-finite}
The composition of quasi-finite morphisms is quasi-finite.
\end{lemma}

\begin{proof}
Combine
Lemmas \ref{lemma-composition-locally-quasi-finite} and
\ref{lemma-composition-quasi-compact}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-quasi-finite}
A base change of a quasi-finite morphism is quasi-finite.
\end{lemma}

\begin{proof}
Combine
Lemmas \ref{lemma-base-change-locally-quasi-finite} and
\ref{lemma-base-change-quasi-compact}.
\end{proof}

\begin{lemma}
\label{lemma-quasi-finite-permanence}
Let $f : \mathcal{X} \to \mathcal{Y}$ and
$g : \mathcal{Y} \to \mathcal{Z}$ be morphisms of algebraic stacks.
If $g \circ f$ is quasi-finite and $g$ is quasi-separated and quasi-DM
then $f$ is quasi-finite.
\end{lemma}

\begin{proof}
Combine
Lemmas \ref{lemma-locally-quasi-finite-permanence} and
\ref{lemma-quasi-compact-permanence}.
\end{proof}












\section{Flat morphisms}
\label{section-flat}

\noindent
The property ``being flat'' of morphisms of algebraic
spaces is smooth local on the source-and-target, see
Descent on Spaces, Remark \ref{spaces-descent-remark-list-local-source-target}.
It is also stable under base change and fpqc local on the target, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-base-change-flat}
and
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-flat}.
Hence, by
Lemma \ref{lemma-local-source-target}
above, we may define what it means for a morphism of algebraic spaces
to be flat as follows and it agrees with the already
existing notion defined in
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}
when the morphism is representable by algebraic spaces.

\begin{definition}
\label{definition-flat}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $f$ is {\it flat} if the equivalent conditions of
Lemma \ref{lemma-local-source-target}
hold with $\mathcal{P} = \text{flat}$.
\end{definition}

\begin{lemma}
\label{lemma-composition-flat}
The composition of flat morphisms is flat.
\end{lemma}

\begin{proof}
Combine
Remark \ref{remark-composition}
with
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-composition-flat}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-flat}
A base change of a flat morphism is flat.
\end{lemma}

\begin{proof}
Combine
Remark \ref{remark-base-change}
with
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-base-change-flat}.
\end{proof}

\begin{lemma}
\label{lemma-descent-flat}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $\mathcal{Z} \to \mathcal{Y}$ be a surjective flat morphism of algebraic
stacks. If the base change
$\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$
is flat, then $f$ is flat.
\end{lemma}

\begin{proof}
Choose an algebraic space $W$ and a surjective smooth morphism
$W \to \mathcal{Z}$. Then $W \to \mathcal{Z}$ is surjective and flat
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-smooth-flat})
hence $W \to \mathcal{Y}$ is surjective and flat (by
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-composition-surjective}
and
Lemma \ref{lemma-composition-flat}).
Since the base change of
$\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$
by $W \to \mathcal{Z}$ is a flat morphism
(Lemma \ref{lemma-base-change-flat})
we may replace $\mathcal{Z}$ by $W$.

\medskip\noindent
Choose an algebraic space $V$ and a surjective smooth morphism
$V \to \mathcal{Y}$. Choose an algebraic space $U$ and a surjective
smooth morphism $U \to V \times_\mathcal{Y} \mathcal{X}$.
We have to show that $U \to V$ is flat. Now we base change
everything by $W \to \mathcal{Y}$: Set $U' = W \times_\mathcal{Y} U$,
$V' = W \times_\mathcal{Y} V$,
$\mathcal{X}' = W \times_\mathcal{Y} \mathcal{X}$,
and $\mathcal{Y}' = W \times_\mathcal{Y} \mathcal{Y} = W$.
Then it is still true that $U' \to V' \times_{\mathcal{Y}'} \mathcal{X}'$
is smooth by base change. Hence by our definition of flat morphisms
of algebraic stacks and the assumption that $\mathcal{X}' \to \mathcal{Y}'$
is flat, we see that $U' \to V'$ is flat. Then, since
$V' \to V$ is surjective as a base change of $W \to \mathcal{Y}$ we see
that $U \to V$ is flat by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-base-change-module-flat} (2)
and we win.
\end{proof}

\begin{lemma}
\label{lemma-flat-permanence}
Let $\mathcal{X} \to \mathcal{Y} \to \mathcal{Z}$ be morphisms of
algebraic stacks. If $\mathcal{X} \to \mathcal{Z}$ is flat
and $\mathcal{X} \to \mathcal{Y}$ is surjective and flat, then
$\mathcal{Y} \to \mathcal{Z}$ is flat.
\end{lemma}

\begin{proof}
Choose an algebraic space $W$ and a surjective smooth morphism
$W \to \mathcal{Z}$. Choose an algebraic space $V$ and a surjective smooth
morphism $V \to W \times_\mathcal{Z} \mathcal{Y}$. Choose an algebraic space
$U$ and a surjective smooth morphism $U \to V \times_\mathcal{Y} \mathcal{X}$.
We know that $U \to V$ is flat and that $U \to W$ is flat.
Also, as $\mathcal{X} \to \mathcal{Y}$ is surjective we see that
$U \to V$ is surjective (as a composition of surjective morphisms).
Hence the lemma reduces to the case of morphisms of algebraic spaces.
The case of morphisms of algebraic spaces is
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-flat-permanence}.
\end{proof}

\begin{lemma}
\label{lemma-lift-valuation-ring-through-flat-morphism}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a flat morphism
of algebraic stacks. Let $\Spec(A) \to \mathcal{Y}$ be a morphism
where $A$ is a valuation ring. If the closed point of $\Spec(A)$ maps to a
point of $|\mathcal{Y}|$ in the image of $|\mathcal{X|} \to |\mathcal{Y}|$,
then there exists a commutative diagram
$$
\xymatrix{
\Spec(A') \ar[r] \ar[d] & \mathcal{X} \ar[d] \\
\Spec(A) \ar[r] & \mathcal{Y}
}
$$
where $A \to A'$ is an extension of valuation rings
(More on Algebra, Definition
\ref{more-algebra-definition-extension-valuation-rings}).
\end{lemma}

\begin{proof}
The base change $\mathcal{X}_A \to \Spec(A)$ is flat
(Lemma \ref{lemma-base-change-flat}) and the closed point of
$\Spec(A)$ is in the image of $|\mathcal{X}_A| \to |\Spec(A)|$
(Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian}).
Thus we may assume $\mathcal{Y} = \Spec(A)$. Let $U \to \mathcal{X}$
be a surjective smooth morphism where $U$ is a scheme.
Then we can apply Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-lift-valuation-ring-through-flat-morphism}
to the morphism $U \to \Spec(A)$ to conclude.
\end{proof}







\section{Flat at a point}
\label{section-flat-at-point}

\noindent
We still have to develop the general machinery needed to say what
it means for a morphism of algebraic stacks to have a given property
at a point. For the moment the following lemma is sufficient.

\begin{lemma}
\label{lemma-flat-at-point}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $x \in |\mathcal{X}|$. Consider commutative diagrams
$$
\vcenter{
\xymatrix{
U \ar[d]_a \ar[r]_h & V \ar[d]^b \\
\mathcal{X} \ar[r]^f & \mathcal{Y}
}
}
\quad\text{with points}
\vcenter{
\xymatrix{
u \in |U| \ar[d] \\
x \in |\mathcal{X}|
}
}
$$
where $U$ and $V$ are algebraic spaces, $b$ is flat, and
$(a, h) : U \to \mathcal{X} \times_\mathcal{Y} V$
is flat. The following are equivalent
\begin{enumerate}
\item $h$ is flat at $u$ for one diagram as above,
\item $h$ is flat at $u$ for every diagram as above.
\end{enumerate}
\end{lemma}

\begin{proof}
Suppose we are given a second diagram $U', V', u', a', b', h'$ as
in the lemma. Then we can consider
$$
\xymatrix{
U \ar[d] & U \times_\mathcal{X} U' \ar[l] \ar[d] \ar[r] & U' \ar[d] \\
V & V \times_\mathcal{Y} V' \ar[l] \ar[r] & V'
}
$$
By Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian}
there is a point $u'' \in |U \times_\mathcal{X} U'|$ mapping
to $u$ and $u'$. If $h$ is flat at $u$, then the base change
$U \times_V (V \times_\mathcal{Y} V') \to V \times_\mathcal{Y} V'$
is flat at any point over $u$, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-module-flat}.
On the other hand, the morphism
$$
U \times_\mathcal{X} U' \to
U \times_\mathcal{X} (\mathcal{X} \times_\mathcal{Y} V') =
U \times_\mathcal{Y} V' =
U \times_V (V \times_\mathcal{Y} V')
$$
is flat as a base change of $(a', h')$, see Lemma \ref{lemma-base-change-flat}.
Composing and using
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-composition-module-flat}
we conclude that $U \times_\mathcal{X} U' \to V \times_\mathcal{Y} V'$
is flat at $u''$. Then we can use composition by the flat map
$V \times_\mathcal{Y} V' \to V'$ to conclude that
$U \times_\mathcal{X} U' \to V'$ is flat at $u''$.
Finally, since $U \times_\mathcal{X} U' \to U'$ is flat
at $u''$ and $u''$ maps to $u'$ we conclude that
$U' \to V'$ is flat at $u'$ by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-permanence}.
\end{proof}

\begin{definition}
\label{definition-flat-at-point}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $x \in |\mathcal{X}|$. We say $f$ is {\it flat at $x$} if the
equivalent conditions of Lemma \ref{lemma-flat-at-point} hold.
\end{definition}





\section{Morphisms of finite presentation}
\label{section-finite-presentation}

\noindent
The property ``locally of finite presentation'' of morphisms of algebraic
spaces is smooth local on the source-and-target, see
Descent on Spaces, Remark \ref{spaces-descent-remark-list-local-source-target}.
It is also stable under base change and fpqc local on the target, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-base-change-finite-presentation}
and
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-locally-finite-presentation}.
Hence, by
Lemma \ref{lemma-local-source-target}
above, we may define what it means for a morphism of algebraic stacks
to be locally of finite presentation as follows and it agrees with the already
existing notion defined in
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}
when the morphism is representable by algebraic spaces.

\begin{definition}
\label{definition-locally-finite-presentation}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
\begin{enumerate}
\item We say $f$
{\it locally of finite presentation} if the equivalent conditions of
Lemma \ref{lemma-local-source-target}
hold with
$\mathcal{P} = \text{locally of finite presentation}$.
\item We say $f$ is
{\it of finite presentation} if it is locally of finite presentation,
quasi-compact, and quasi-separated.
\end{enumerate}
\end{definition}

\noindent
Note that a morphism of finite presentation is {\bf not} just a quasi-compact
morphism which is locally of finite presentation.

\begin{lemma}
\label{lemma-composition-finite-presentation}
The composition of finitely presented morphisms is of finite presentation.
The same holds for morphisms which are locally of finite presentation.
\end{lemma}

\begin{proof}
Combine
Remark \ref{remark-composition}
with
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-composition-finite-presentation}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-finite-presentation}
A base change of a finitely presented morphism is of finite presentation.
The same holds for morphisms which are locally of finite presentation.
\end{lemma}

\begin{proof}
Combine
Remark \ref{remark-base-change}
with
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-base-change-finite-presentation}.
\end{proof}

\begin{lemma}
\label{lemma-finite-presentation-finite-type}
A morphism which is locally of finite presentation is locally of finite type.
A morphism of finite presentation is of finite type.
\end{lemma}

\begin{proof}
Combine
Remark \ref{remark-implication}
with
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-finite-presentation-finite-type}.
\end{proof}

\begin{lemma}
\label{lemma-noetherian-finite-type-finite-presentation}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
\begin{enumerate}
\item If $\mathcal{Y}$ is locally Noetherian and $f$ locally of finite type
then $f$ is locally of finite presentation.
\item If $\mathcal{Y}$ is locally Noetherian and $f$ of finite type and
quasi-separated then $f$ is of finite presentation.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume $f : \mathcal{X} \to \mathcal{Y}$
locally of finite type and $\mathcal{Y}$ locally Noetherian.
This means there exists a diagram as in
Lemma \ref{lemma-local-source-target}
with $h$ locally of finite type and surjective vertical arrow $a$. By
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-noetherian-finite-type-finite-presentation}
$h$ is locally of finite presentation.
Hence $\mathcal{X} \to \mathcal{Y}$
is locally of finite presentation by definition.
This proves (1).
If $f$ is of finite type and quasi-separated then it is also
quasi-compact and quasi-separated and (2) follows immediately.
\end{proof}

\begin{lemma}
\label{lemma-finite-presentation-permanence}
Let $f : \mathcal{X} \to \mathcal{Y}$ and
$g : \mathcal{Y} \to \mathcal{Z}$ be morphisms of algebraic stacks
If $g \circ f$ is locally of finite presentation and $g$ is locally of
finite type, then $f$ is locally of finite presentation.
\end{lemma}

\begin{proof}
Choose an algebraic space $W$ and a surjective smooth morphism
$W \to \mathcal{Z}$.
Choose an algebraic space $V$ and a surjective smooth morphism
$V \to \mathcal{Y} \times_\mathcal{Z} W$.
Choose an algebraic space $U$ and a surjective smooth morphism
$U \to \mathcal{X} \times_\mathcal{Y} V$.
The lemma follows upon applying
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-finite-presentation-permanence}
to the morphisms $U \to V \to W$.
\end{proof}

\begin{lemma}
\label{lemma-diagonal-morphism-finite-type}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
with diagonal
$\Delta : \mathcal{X} \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$.
If $f$ is locally of finite type then $\Delta$ is
locally of finite presentation. If $f$ is
quasi-separated and locally of finite type, then $\Delta$ is of finite
presentation.
\end{lemma}

\begin{proof}
Note that $\Delta$ is a morphism over $\mathcal{X}$ (via the second
projection). If $f$ is locally of finite type, then
$\mathcal{X}$ is of finite presentation over $\mathcal{X}$ and
$\text{pr}_2 : \mathcal{X} \times_\mathcal{Y} \mathcal{X} \to \mathcal{X}$
is locally of finite type by Lemma \ref{lemma-base-change-finite-type}.
Thus the first statement holds by
Lemma \ref{lemma-finite-presentation-permanence}.
The second statement follows from the first and
the definitions (because $f$ being quasi-separated means
by definition that $\Delta_f$ is quasi-compact and quasi-separated).
\end{proof}

\begin{lemma}
\label{lemma-open-immersion-locally-finite-presentation}
An open immersion is locally of finite presentation.
\end{lemma}

\begin{proof}
In view of Properties of Stacks, Definition
\ref{stacks-properties-definition-immersion}
this follows from
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-open-immersion-locally-finite-presentation}.
\end{proof}

\begin{lemma}
\label{lemma-check-property-after-fppf-base-change}
Let $P$ be a property of morphisms of algebraic spaces which is
fppf local on the target and preserved by arbitrary base change.
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
representable by algebraic spaces.
Let $\mathcal{Z} \to \mathcal{Y}$ be a morphism of algebraic stacks which
is surjective, flat, and locally of finite presentation.
Set $\mathcal{W} = \mathcal{Z} \times_\mathcal{Y} \mathcal{X}$. Then
$$
(f\text{ has }P) \Leftrightarrow
(\text{the projection }\mathcal{W} \to \mathcal{Z}\text{ has }P).
$$
For the meaning of this statement see
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}.
\end{lemma}

\begin{proof}
Choose an algebraic space $W$ and a morphism
$W \to \mathcal{Z}$ which is surjective, flat, and locally of finite
presentation. By
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-composition-surjective}
and Lemmas \ref{lemma-composition-flat} and
\ref{lemma-composition-finite-presentation}
the composition $W \to \mathcal{Y}$ is also surjective, flat, and
locally of finite presentation. Denote
$V = W \times_\mathcal{Z} \mathcal{W} = V \times_\mathcal{Y} \mathcal{X}$.
By Properties of Stacks, Lemma
\ref{stacks-properties-lemma-check-property-covering}
we see that $f$ has $\mathcal{P}$ if and only if $V \to W$ does
and that $\mathcal{W} \to \mathcal{Z}$ has $\mathcal{P}$ if and only
if $V \to W$ does. The lemma follows.
\end{proof}

\begin{lemma}
\label{lemma-descent-property}
Let $\mathcal{P}$ be a property of morphisms of algebraic spaces
which is smooth local on the source-and-target and fppf local
on the target.
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $\mathcal{Z} \to \mathcal{Y}$ be a surjective, flat, locally finitely
presented morphism of algebraic stacks. If the base change
$\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$
has $\mathcal{P}$, then $f$ has $\mathcal{P}$.
\end{lemma}

\begin{proof}
Assume $\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$
has $\mathcal{P}$. Choose an algebraic space $W$ and a surjective
smooth morphism $W \to \mathcal{Z}$. Observe that
$W \times_\mathcal{Z} \mathcal{Z} \times_\mathcal{Y} \mathcal{X} =
W \times_\mathcal{Y} \mathcal{X}$. Thus by the very definition of
what it means for $\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$
to have $\mathcal{P}$ (see Definition \ref{definition-P}
and Lemma \ref{lemma-local-source-target})
we see that $W \times_\mathcal{Y} \mathcal{X} \to W$
has $\mathcal{P}$. On the other hand, $W \to \mathcal{Z}$
is surjective, flat, and locally of finite presentation
(Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-smooth-flat} and
\ref{spaces-morphisms-lemma-smooth-locally-finite-presentation})
hence $W \to \mathcal{Y}$ is surjective, flat, and locally of finite
presentation (by
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-composition-surjective}
and
Lemmas \ref{lemma-composition-flat} and
\ref{lemma-composition-finite-presentation}).
Thus we may replace $\mathcal{Z}$ by $W$.

\medskip\noindent
Choose an algebraic space $V$ and a surjective smooth morphism
$V \to \mathcal{Y}$. Choose an algebraic space $U$ and a surjective
smooth morphism $U \to V \times_\mathcal{Y} \mathcal{X}$.
We have to show that $U \to V$ has $\mathcal{P}$.
Now we base change everything by $W \to \mathcal{Y}$: Set
$U' = W \times_\mathcal{Y} U$,
$V' = W \times_\mathcal{Y} V$,
$\mathcal{X}' = W \times_\mathcal{Y} \mathcal{X}$,
and $\mathcal{Y}' = W \times_\mathcal{Y} \mathcal{Y} = W$.
Then it is still true that $U' \to V' \times_{\mathcal{Y}'} \mathcal{X}'$
is smooth by base change. Hence by Lemma \ref{lemma-local-source-target}
used in the definition of $\mathcal{X}' \to \mathcal{Y}' = W$
having $\mathcal{P}$ we see that $U' \to V'$ has $\mathcal{P}$.
Then, since $V' \to V$ is surjective, flat, and locally of finite presentation
as a base change of $W \to \mathcal{Y}$ we see that $U \to V$
has $\mathcal{P}$ as $\mathcal{P}$ is local in the fppf topology
on the target.
\end{proof}

\begin{lemma}
\label{lemma-descent-finite-presentation}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $\mathcal{Z} \to \mathcal{Y}$ be a surjective, flat, locally finitely
presented morphism of algebraic stacks. If the base change
$\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$
is locally of finite presentation, then $f$ is locally of finite
presentation.
\end{lemma}

\begin{proof}
The property
``locally of finite presentation''
satisfies the conditions of Lemma \ref{lemma-descent-property}.
Smooth local on the source-and-target we have seen in the
introduction to this section and fppf local on the target is
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-locally-finite-presentation}.
\end{proof}

\begin{lemma}
\label{lemma-flat-finite-presentation-permanence}
Let $\mathcal{X} \to \mathcal{Y} \to \mathcal{Z}$ be morphisms of
algebraic stacks. If $\mathcal{X} \to \mathcal{Z}$ is locally of finite
presentation and $\mathcal{X} \to \mathcal{Y}$ is surjective, flat, and
locally of finite presentation, then $\mathcal{Y} \to \mathcal{Z}$
is locally of finite presentation.
\end{lemma}

\begin{proof}
Choose an algebraic space $W$ and a surjective smooth morphism
$W \to \mathcal{Z}$. Choose an algebraic space $V$ and a surjective smooth
morphism $V \to W \times_\mathcal{Z} \mathcal{Y}$. Choose an algebraic space
$U$ and a surjective smooth morphism $U \to V \times_\mathcal{Y} \mathcal{X}$.
We know that $U \to V$ is flat and locally of finite presentation
and that $U \to W$ is locally of finite presentation.
Also, as $\mathcal{X} \to \mathcal{Y}$ is surjective we see that
$U \to V$ is surjective (as a composition of surjective morphisms).
Hence the lemma reduces to the case of morphisms of algebraic spaces.
The case of morphisms of algebraic spaces is
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-locally-finite-presentation-fppf-local-source}.
\end{proof}

\begin{lemma}
\label{lemma-surjective-flat-locally-finite-presentation}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
which is surjective, flat, and locally of finite presentation.
Then for every scheme $U$ and object $y$ of $\mathcal{Y}$ over $U$
there exists an fppf covering $\{U_i \to U\}$ and objects $x_i$
of $\mathcal{X}$ over $U_i$ such that $f(x_i) \cong y|_{U_i}$ in
$\mathcal{Y}_{U_i}$.
\end{lemma}

\begin{proof}
We may think of $y$ as a morphism $U \to \mathcal{Y}$. By
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-base-change-surjective}
and
Lemmas \ref{lemma-base-change-finite-presentation} and
\ref{lemma-base-change-flat}
we see that $\mathcal{X} \times_\mathcal{Y} U \to U$ is surjective, flat,
and locally of finite presentation. Let $V$ be a scheme and let
$V \to \mathcal{X} \times_\mathcal{Y} U$ smooth and surjective.
Then $V \to \mathcal{X} \times_\mathcal{Y} U$ is also surjective, flat, and
locally of finite presentation (see
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-smooth-flat} and
\ref{spaces-morphisms-lemma-smooth-locally-finite-presentation}).
Hence also $V \to U$ is surjective, flat, and
locally of finite presentation, see
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-composition-surjective}
and
Lemmas \ref{lemma-composition-finite-presentation}, and
\ref{lemma-composition-flat}.
Hence $\{V \to U\}$ is the desired fppf covering and $x : V \to \mathcal{X}$
is the desired object.
\end{proof}

\begin{lemma}
\label{lemma-surjective-family-flat-locally-finite-presentation}
Let $f_j : \mathcal{X}_j \to \mathcal{X}$, $j \in J$ be a family of morphisms
of algebraic stacks which are each flat and locally of finite presentation
and which are jointly surjective, i.e.,
$|\mathcal{X}| = \bigcup |f_j|(|\mathcal{X}_j|)$.
Then for every scheme $U$ and object $x$ of $\mathcal{X}$ over $U$
there exists an fppf covering $\{U_i \to U\}_{i \in I}$, a map
$a : I \to J$, and objects $x_i$ of $\mathcal{X}_{a(i)}$ over $U_i$
such that $f_{a(i)}(x_i) \cong y|_{U_i}$ in $\mathcal{X}_{U_i}$.
\end{lemma}

\begin{proof}
Apply
Lemma \ref{lemma-surjective-flat-locally-finite-presentation}
to the morphism $\coprod_{j \in J} \mathcal{X}_j \to \mathcal{X}$.
(There is a slight set theoretic issue here -- due to our setup of
things -- which we ignore.) To finish, note that a morphism
$x_i : U_i \to \coprod_{j \in J} \mathcal{X}_j$ is given by a
disjoint union decomposition $U_i = \coprod U_{i, j}$ and morphisms
$U_{i, j} \to \mathcal{X}_j$. Then the fppf covering $\{U_{i, j} \to U\}$
and the morphisms $U_{i, j} \to \mathcal{X}_j$ do the job.
\end{proof}

\begin{lemma}
\label{lemma-fppf-open}
Let $f : \mathcal{X} \to \mathcal{Y}$ be flat and locally of finite
presentation. Then $|f| : |\mathcal{X}| \to |\mathcal{Y}|$ is open.
\end{lemma}

\begin{proof}
Choose a scheme $V$ and a smooth surjective morphism $V \to \mathcal{Y}$.
Choose a scheme $U$ and a smooth surjective morphism
$U \to V \times_\mathcal{Y} \mathcal{X}$. By assumption the morphism
of schemes $U \to V$ is flat and locally of finite presentation.
Hence $U \to V$ is open by
Morphisms, Lemma \ref{morphisms-lemma-fppf-open}.
By construction of the topology on $|\mathcal{Y}|$ the map
$|V| \to |\mathcal{Y}|$ is open.
The map $|U| \to |\mathcal{X}|$ is surjective.
The result follows from these facts by elementary topology.
\end{proof}

\begin{lemma}
\label{lemma-descent-quasi-compact}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $\mathcal{Z} \to \mathcal{Y}$ be a surjective, flat, locally finitely
presented morphism of algebraic stacks. If the base change
$\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$
is quasi-compact, then $f$ is quasi-compact.
\end{lemma}

\begin{proof}
We have to show that given $\mathcal{Y}' \to \mathcal{Y}$
with $\mathcal{Y}'$ quasi-compact, we have
$\mathcal{Y}' \times_\mathcal{Y} \mathcal{X}$ is quasi-compact.
Denote $\mathcal{Z}' = \mathcal{Z} \times_\mathcal{Y} \mathcal{Y}'$.
Then $|\mathcal{Z}'| \to |\mathcal{Y}'|$ is open, see
Lemma \ref{lemma-fppf-open}. Hence we can find a quasi-compact
open substack $\mathcal{W} \subset \mathcal{Z}'$ mapping onto
$\mathcal{Y}'$. Because
$\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$
is quasi-compact, we know that
$$
\mathcal{W} \times_\mathcal{Z} \mathcal{Z} \times_\mathcal{Y} \mathcal{X} =
\mathcal{W} \times_\mathcal{Y} \mathcal{X}
$$
is quasi-compact. And the map
$\mathcal{W} \times_\mathcal{Y} \mathcal{X} \to
\mathcal{Y}' \times_\mathcal{Y} \mathcal{X}$
is surjective, hence we win. Some details omitted.
\end{proof}

\begin{lemma}
\label{lemma-check-separated-on-ui-cover}
Let $f : \mathcal{X} \to \mathcal{Y}$, $g : \mathcal{Y} \to \mathcal{Z}$
be composable morphisms of algebraic stacks with composition
$h = g \circ f : \mathcal{X} \to \mathcal{Z}$.
If $f$ is surjective, flat, locally of finite presentation,
and universally injective and if $h$ is separated, then
$g$ is separated.
\end{lemma}

\begin{proof}
Consider the diagram
$$
\xymatrix{
\mathcal{X} \ar[r]_\Delta \ar[rd] &
\mathcal{X} \times_\mathcal{Y} \mathcal{X} \ar[r] \ar[d] &
\mathcal{X} \times_\mathcal{Z} \mathcal{X} \ar[d] \\
& \mathcal{Y} \ar[r] & \mathcal{Y} \times_\mathcal{Z} \mathcal{Y}
}
$$
The square is cartesian. We have to show the bottom horizontal arrow is proper.
We already know that it is representable by algebraic spaces and
locally of finite type (Lemma \ref{lemma-properties-diagonal}).
Since the right vertical arrow is
surjective, flat, and locally of finite presentation
it suffices to show the top right horizontal arrow
is proper (Lemma \ref{lemma-check-property-after-fppf-base-change}).
Since $h$ is separated, the composition of the top horizontal
arrows is proper.

\medskip\noindent
Since $f$ is universally injective $\Delta$ is surjective
(Lemma \ref{lemma-universally-injective}). Since the
composition of $\Delta$ with the projection
$\mathcal{X} \times_\mathcal{Y} \mathcal{X} \to \mathcal{X}$
is the identity, we see that $\Delta$ is universally closed.
By Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-image-universally-closed-separated}
we conclude that $\mathcal{X} \times_\mathcal{Y} \mathcal{X} \to
\mathcal{X} \times_\mathcal{Z} \mathcal{X}$
is separated as $\mathcal{X} \to \mathcal{X} \times_\mathcal{Z} \mathcal{X}$
is separated. Here we use
that implications between properties of morphisms of algebraic
spaces can be transferred to the same implications between
properties of morphisms of algebraic stacks representable
by algebraic spaces; this is discussed in Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}.
Finally, we use the same principle to conlude that
$\mathcal{X} \times_\mathcal{Y} \mathcal{X} \to
\mathcal{X} \times_\mathcal{Z} \mathcal{X}$ is proper
from Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-image-proper-is-proper}.
\end{proof}














\section{Gerbes}
\label{section-gerbes}

\noindent
An important type of algebraic stack are the stacks of the
form $[B/G]$ where $B$ is an algebraic space and $G$ is a flat
and locally finitely presented group algebraic space over $B$
(acting trivially on $B$), see
Criteria for Representability, Lemma \ref{criteria-lemma-BG-algebraic}.
It turns out that an algebraic stack is a gerbe when it locally in the
fppf topology is of this form, see
Lemma \ref{lemma-local-structure-gerbe}.
In this section we briefly discuss this notion and the corresponding
relative notion.

\begin{definition}
\label{definition-gerbe}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $\mathcal{X}$ is a {\it gerbe over} $\mathcal{Y}$ if
$\mathcal{X}$ is a gerbe over $\mathcal{Y}$ as stacks
in groupoids over $(\Sch/S)_{fppf}$, see
Stacks, Definition \ref{stacks-definition-gerbe-over-stack-in-groupoids}.
We say an algebraic stack $\mathcal{X}$ is a {\it gerbe} if there exists
a morphism $\mathcal{X} \to X$ where $X$ is an algebraic space which
turns $\mathcal{X}$ into a gerbe over $X$.
\end{definition}

\noindent
The condition that $\mathcal{X}$ be a gerbe over $\mathcal{Y}$ is defined
purely in terms of the topology and category theory underlying the given
algebraic stacks; but as we will see later this condition has
geometric consequences. For example it implies that
$\mathcal{X} \to \mathcal{Y}$ is surjective, flat, and
locally of finite presentation, see
Lemma \ref{lemma-gerbe-fppf}.
The absolute notion is trickier to parse, because it
may not be at first clear that $X$ is well determined. Actually, it is.

\begin{lemma}
\label{lemma-gerbe-over-iso-classes}
Let $\mathcal{X}$ be an algebraic stack. If $\mathcal{X}$ is a gerbe, then
the sheafification of the presheaf
$$
(\Sch/S)_{fppf}^{opp} \to \textit{Sets}, \quad
U \mapsto \Ob(\mathcal{X}_U)/\!\!\cong
$$
is an algebraic space and $\mathcal{X}$ is a gerbe over it.
\end{lemma}

\begin{proof}
(In this proof the abuse of language introduced in
Section \ref{section-conventions}
really pays off.)
Choose a morphism $\pi : \mathcal{X} \to X$ where $X$ is an
algebraic space which turns $\mathcal{X}$ into a gerbe over $X$.
It suffices to prove that $X$ is the sheafification of the presheaf
$\mathcal{F}$ displayed in the lemma.
It is clear that there is a map $c : \mathcal{F} \to X$.
We will use
Stacks, Lemma \ref{stacks-lemma-when-gerbe}
properties (2)(a) and (2)(b) to see that the map $c^\# : \mathcal{F}^\# \to X$
is surjective and injective, hence an isomorphism, see
Sites, Lemma \ref{sites-lemma-mono-epi-sheaves}.
Surjective: Let $T$ be a scheme and let $f : T \to X$. By property (2)(a)
there exists an fppf covering $\{h_i : T_i \to T\}$ and morphisms
$x_i : T_i \to \mathcal{X}$ such that $f \circ h_i$ corresponds to
$\pi \circ x_i$. Hence we see that $f|_{T_i}$ is in the image of $c$.
Injective: Let $T$ be a scheme and let $x, y : T \to \mathcal{X}$
be morphisms such that $c \circ x = c \circ y$.
By (2)(b) we can find a covering $\{T_i \to T\}$ and morphisms
$x|_{T_i} \to y|_{T_i}$ in the fibre category $\mathcal{X}_{T_i}$.
Hence the restrictions $x|_{T_i}, y|_{T_i}$ are equal in
$\mathcal{F}(T_i)$. This proves that $x, y$ give the same section
of $\mathcal{F}^\#$ over $T$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-base-change-gerbe}
Let
$$
\xymatrix{
\mathcal{X}' \ar[r] \ar[d] & \mathcal{X} \ar[d] \\
\mathcal{Y}' \ar[r] & \mathcal{Y}
}
$$
be a fibre product of algebraic stacks.
If $\mathcal{X}$ is a gerbe over $\mathcal{Y}$, then
$\mathcal{X}'$ is a gerbe over $\mathcal{Y}'$.
\end{lemma}

\begin{proof}
Immediate from the definitions and
Stacks, Lemma \ref{stacks-lemma-base-change-gerbe}.
\end{proof}

\begin{lemma}
\label{lemma-composition-gerbe}
Let $\mathcal{X} \to \mathcal{Y}$ and $\mathcal{Y} \to \mathcal{Z}$
be morphisms of algebraic stacks. If $\mathcal{X}$ is a gerbe over
$\mathcal{Y}$ and $\mathcal{Y}$ is a gerbe over $\mathcal{Z}$, then
$\mathcal{X}$ is a gerbe over $\mathcal{Z}$.
\end{lemma}

\begin{proof}
Immediate from
Stacks, Lemma \ref{stacks-lemma-composition-gerbe}.
\end{proof}

\begin{lemma}
\label{lemma-gerbe-descent}
Let
$$
\xymatrix{
\mathcal{X}' \ar[r] \ar[d] & \mathcal{X} \ar[d] \\
\mathcal{Y}' \ar[r] & \mathcal{Y}
}
$$
be a fibre product of algebraic stacks.
If $\mathcal{Y}' \to \mathcal{Y}$ is surjective, flat, and locally
of finite presentation and $\mathcal{X}'$ is a gerbe over $\mathcal{Y}'$,
then $\mathcal{X}$ is a gerbe over $\mathcal{Y}$.
\end{lemma}

\begin{proof}
Follows immediately from
Lemma \ref{lemma-surjective-flat-locally-finite-presentation}
and
Stacks, Lemma \ref{stacks-lemma-gerbe-descent}.
\end{proof}

\begin{lemma}
\label{lemma-gerbe-with-section}
Let $\pi : \mathcal{X} \to U$ be a morphism from an algebraic stack to
an algebraic space and let $x : U \to \mathcal{X}$ be a section of $\pi$.
Set $G = \mathit{Isom}_\mathcal{X}(x, x)$, see
Definition \ref{definition-isom}.
If $\mathcal{X}$ is a gerbe over $U$, then
\begin{enumerate}
\item there is a canonical equivalence of stacks in groupoids
$$
x_{can} : [U/G] \longrightarrow \mathcal{X}.
$$
where $[U/G]$ is the quotient stack for the trivial
action of $G$ on $U$,
\item $G \to U$ is flat and locally of finite presentation, and
\item $U \to \mathcal{X}$ is surjective, flat, and locally of finite
presentation.
\end{enumerate}
\end{lemma}

\begin{proof}
Set $R = U \times_{x, \mathcal{X}, x} U$. The morphism $R \to U \times U$
factors through the diagonal $\Delta_U : U \to U \times U$ as it factors
through $U \times_U U = U$. Hence $R = G$ because
\begin{align*}
G & = \mathit{Isom}_\mathcal{X}(x, x) \\
& = U \times_{x, \mathcal{X}} \mathcal{I}_\mathcal{X} \\
& = U \times_{x, \mathcal{X}}
(\mathcal{X}
\times_{\Delta, \mathcal{X} \times_S \mathcal{X}, \Delta}
\mathcal{X}) \\
& = (U \times_{x, \mathcal{X}, x} U) \times_{U \times U, \Delta_U} U \\
& = R \times_{U \times U, \Delta_U} U \\
& = R
\end{align*}
for the fourth equality use
Categories, Lemma \ref{categories-lemma-diagonal-2}.
Let $t, s : R \to U$ be the projections.
The composition law $c : R \times_{s, U, t} R \to R$ constructed on $R$ in
Algebraic Stacks, Lemma \ref{algebraic-lemma-map-space-into-stack}
agrees with the group law on $G$ (proof omitted). Thus
Algebraic Stacks, Lemma \ref{algebraic-lemma-map-space-into-stack}
shows we obtain a canonical fully faithful $1$-morphism
$$
x_{can} : [U/G] \longrightarrow \mathcal{X}
$$
of stacks in groupoids over $(\Sch/S)_{fppf}$. To see that it is
an equivalence it suffices to show that it is essentially surjective.
To do this it suffices to show that any object of $\mathcal{X}$ over
a scheme $T$ comes fppf locally from $x$ via a morphism $T \to U$, see
Stacks, Lemma \ref{stacks-lemma-characterize-essentially-surjective-when-ff}.
However, this follows the condition that $\pi$ turns $\mathcal{X}$
into a gerbe over $U$, see property (2)(a) of
Stacks, Lemma \ref{stacks-lemma-when-gerbe}.

\medskip\noindent
By
Criteria for Representability, Lemma \ref{criteria-lemma-BG-algebraic}
we conclude that $G \to U$ is flat and locally of finite presentation.
Finally, $U \to \mathcal{X}$ is surjective, flat, and locally of finite
presentation by
Criteria for Representability, Lemma
\ref{criteria-lemma-flat-quotient-flat-presentation}.
\end{proof}

\begin{lemma}
\label{lemma-local-structure-gerbe}
Let $\pi : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The following are equivalent
\begin{enumerate}
\item $\mathcal{X}$ is a gerbe over $\mathcal{Y}$, and
\item there exists an algebraic space $U$, a group algebraic space $G$
flat and locally of finite presentation over $U$, and a
surjective, flat, and locally finitely presented
morphism $U \to \mathcal{Y}$ such that
$\mathcal{X} \times_\mathcal{Y} U \cong [U/G]$ over $U$.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (2). By
Lemma \ref{lemma-gerbe-descent}
to prove (1) it suffices to show that $[U/G]$ is a gerbe over $U$.
This is immediate from
Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-group-quotient-gerbe}.

\medskip\noindent
Assume (1). Any base change of $\pi$ is a gerbe, see
Lemma \ref{lemma-base-change-gerbe}.
As a first step we choose a scheme $V$ and a surjective smooth morphism
$V \to \mathcal{Y}$. Thus we may assume that $\pi : \mathcal{X} \to V$
is a gerbe over a scheme. This means that there exists an
fppf covering $\{V_i \to V\}$ such that the fibre category
$\mathcal{X}_{V_i}$ is nonempty, see
Stacks, Lemma \ref{stacks-lemma-when-gerbe} (2)(a).
Note that $U = \coprod V_i \to V$ is surjective, flat, and
locally of finite presentation. Hence we may replace $V$ by $U$ and
assume that $\pi : \mathcal{X} \to U$ is a gerbe over a scheme $U$ and
that there exists an object $x$ of $\mathcal{X}$ over $U$. By
Lemma \ref{lemma-gerbe-with-section}
we see that $\mathcal{X} = [U/G]$ over $U$ for some flat
and locally finitely presented group algebraic space $G$ over $U$.
\end{proof}

\begin{lemma}
\label{lemma-gerbe-fppf}
Let $\pi : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
If $\mathcal{X}$ is a gerbe over $\mathcal{Y}$, then $\pi$ is surjective,
flat, and locally of finite presentation.
\end{lemma}

\begin{proof}
By
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-descent-surjective}
and
Lemmas \ref{lemma-descent-flat} and
\ref{lemma-descent-finite-presentation}
it suffices to prove to the lemma after replacing $\pi$ by a base change
with a surjective, flat, locally finitely presented morphism
$\mathcal{Y}' \to \mathcal{Y}$. By
Lemma \ref{lemma-local-structure-gerbe}
we may assume $\mathcal{Y} = U$ is an algebraic space and
$\mathcal{X} = [U/G]$ over $U$.
Then $U \to [U/G]$ is surjective, flat, and
locally of finite presentation, see
Lemma \ref{lemma-gerbe-with-section}.
This implies that $\pi$ is surjective, flat, and locally
of finite presentation by
Properties of Stacks,
Lemma \ref{stacks-properties-lemma-surjective-permanence}
and
Lemmas \ref{lemma-flat-permanence} and
\ref{lemma-flat-finite-presentation-permanence}.
\end{proof}

\begin{proposition}
\label{proposition-when-gerbe}
Let $\mathcal{X}$ be an algebraic stack. The following are equivalent
\begin{enumerate}
\item $\mathcal{X}$ is a gerbe, and
\item $\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is flat and locally of
finite presentation.
\end{enumerate}
\end{proposition}

\begin{proof}
Assume (1). Choose a morphism $\mathcal{X} \to X$ into an algebraic space $X$
which turns $\mathcal{X}$ into a gerbe over $X$. Let $X' \to X$ be a
surjective, flat, locally finitely presented morphism and
set $\mathcal{X}' = X' \times_X \mathcal{X}$. Note that $\mathcal{X}'$
is a gerbe over $X'$ by
Lemma \ref{lemma-base-change-gerbe}.
Then both squares in
$$
\xymatrix{
\mathcal{I}_{\mathcal{X}'} \ar[r] \ar[d] &
\mathcal{X}' \ar[r] \ar[d] & X' \ar[d] \\
\mathcal{I}_\mathcal{X} \ar[r] &
\mathcal{X} \ar[r] & X
}
$$
are fibre product squares, see
Lemma \ref{lemma-cartesian-square-inertia}.
Hence to prove $\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is flat and
locally of finite presentation it suffices to do so after such a base
change by
Lemmas \ref{lemma-descent-flat} and
\ref{lemma-descent-finite-presentation}.
Thus we can apply
Lemma \ref{lemma-local-structure-gerbe}
to assume that $\mathcal{X} = [U/G]$.
By
Lemma \ref{lemma-gerbe-with-section}
we see $G$ is flat and locally of finite presentation over $U$ and
that $x : U \to [U/G]$ is surjective, flat, and locally of finite
presentation. Moreover, the pullback of $\mathcal{I}_\mathcal{X}$
by $x$ is $G$ and we conclude that (2) holds by descent again, i.e., by
Lemmas \ref{lemma-descent-flat} and
\ref{lemma-descent-finite-presentation}.

\medskip\noindent
Conversely, assume (2). Choose a smooth presentation $\mathcal{X} = [U/R]$, see
Algebraic Stacks, Section \ref{algebraic-section-stack-to-presentation}.
Denote $G \to U$ the stabilizer group algebraic space of the groupoid
$(U, R, s, t, c, e, i)$, see
Groupoids in Spaces, Definition
\ref{spaces-groupoids-definition-stabilizer-groupoid}.
By
Lemma \ref{lemma-presentation-inertia}
we see that $G \to U$ is flat and locally of finite presentation as
a base change of $\mathcal{I}_\mathcal{X} \to \mathcal{X}$, see
Lemmas \ref{lemma-base-change-flat} and
\ref{lemma-base-change-finite-presentation}.
Consider the following action
$$
a : G \times_{U, t} R \to R, \quad (g, r) \mapsto c(g, r)
$$
of $G$ on $R$. This action is free on $T$-valued points for any
scheme $T$ as $R$ is a groupoid. Hence $R' = R/G$ is an algebraic
space and the quotient morphism $\pi : R \to R'$ is surjective,
flat, and locally of finite presentation by
Bootstrap, Lemma \ref{bootstrap-lemma-quotient-free-action}.
The projections $s, t : R \to U$ are $G$-invariant, hence
we obtain morphisms $s' , t' : R' \to U$ such that $s = s' \circ \pi$
and $t = t' \circ \pi$.
Since $s, t : R \to U$ are flat and locally of finite presentation
we conclude that $s', t'$ are flat and locally of finite presentation, see
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-flat-permanence} and
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-locally-finite-presentation-fppf-local-source}.
Consider the morphism
$$
j' = (t', s') : R' \longrightarrow U \times U.
$$
We claim this is a monomorphism. Namely, suppose that $T$ is a scheme
and that $a, b : T \to R'$ are morphisms which have the same image
in $U \times U$. By definition of the quotient $R' = R/G$ there
exists an fppf covering $\{h_j : T_j \to T\}$ such
that $a \circ h_j = \pi \circ a_j$ and $b \circ h_j = \pi \circ b_j$
for some morphisms $a_j, b_j : T_j \to R$. Since $a_j, b_j$ have the same
image in $U \times U$ we see that $g_j = c(a_j, i(b_j))$ is a $T_j$-valued
point of $G$ such that $c(g_j, b_j) = a_j$. In other words, $a_j$ and
$b_j$ have the same image in $R'$ and the claim is proved.
Since $j : R \to U \times U$ is a pre-equivalence relation (see
Groupoids in Spaces, Lemma
\ref{spaces-groupoids-lemma-groupoid-pre-equivalence})
and $R \to R'$ is surjective (as a map of sheaves) we see that
$j' : R' \to U \times U$ is an equivalence relation.
Hence
Bootstrap, Theorem \ref{bootstrap-theorem-final-bootstrap}
shows that $X = U/R'$ is an algebraic space.
Finally, we claim that the morphism
$$
\mathcal{X} = [U/R] \longrightarrow X = U/R'
$$
turns $\mathcal{X}$ into a gerbe over $X$. This follows from
Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-when-gerbe}
as $R \to R'$ is surjective, flat, and locally of finite presentation
(if needed use
Bootstrap, Lemma
\ref{bootstrap-lemma-surjective-flat-locally-finite-presentation}
to see this implies the required hypothesis).
\end{proof}

\begin{lemma}
\label{lemma-gerbe-isom-fppf}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
which makes $\mathcal{X}$ a gerbe over $\mathcal{Y}$. Then
\begin{enumerate}
\item $\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \to \mathcal{X}$
is flat and locally of finite presentation,
\item $\mathcal{X} \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
is surjective, flat, and locally of finite presentation,
\item given algebraic spaces $T_i$, $i = 1, 2$ and morphisms
$x_i : T_i \to \mathcal{X}$, with $y_i = f \circ x_i$ the morphism
$$
T_1 \times_{x_1, \mathcal{X}, x_2} T_2 \longrightarrow
T_1 \times_{y_1, \mathcal{Y}, y_2} T_2
$$
is surjective, flat, and locally of finite presentation,
\item given an algebraic space $T$ and morphisms
$x_i : T \to \mathcal{X}$, $i = 1, 2$, with $y_i = f \circ x_i$ the morphism
$$
\mathit{Isom}_\mathcal{X}(x_1, x_2) \longrightarrow
\mathit{Isom}_\mathcal{Y}(y_1, y_2)
$$
is surjective, flat, and locally of finite presentation.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1).
Choose a scheme $Y$ and a surjective smooth morphism $Y \to \mathcal{Y}$.
Set $\mathcal{X}' = \mathcal{X} \times_\mathcal{Y} Y$.
By Lemma \ref{lemma-cartesian-square-inertia} we obtain cartesian
squares
$$
\xymatrix{
\mathcal{I}_{\mathcal{X}'} \ar[r] \ar[d] &
\mathcal{X}' \ar[r] \ar[d] & Y \ar[d] \\
\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \ar[r] &
\mathcal{X} \ar[r] & \mathcal{Y}
}
$$
By Lemmas \ref{lemma-descent-flat} and
\ref{lemma-descent-finite-presentation}
it suffices to prove that $\mathcal{I}_{\mathcal{X}'} \to \mathcal{X}'$
is flat and locally of finite presentation.
This follows from Proposition \ref{proposition-when-gerbe}
(because $\mathcal{X}'$ is a gerbe over $Y$ by
Lemma \ref{lemma-base-change-gerbe}).

\medskip\noindent
Proof of (2). With notation as above, note that we may assume that
$\mathcal{X}' = [Y/G]$ for some group algebraic space $G$ flat and
locally of finite presentation over $Y$, see
Lemma \ref{lemma-local-structure-gerbe}.
The base change of the morphism
$\Delta : \mathcal{X} \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
over $\mathcal{Y}$ by the morphism $Y \to \mathcal{Y}$
is the morphism
$\Delta' : \mathcal{X}' \to \mathcal{X}' \times_Y \mathcal{X}'$.
Hence it suffices to show that $\Delta'$ is
surjective, flat, and locally of finite presentation
(see Lemmas \ref{lemma-descent-flat} and
\ref{lemma-descent-finite-presentation}).
In other words, we have to show that
$$
[Y/G] \longrightarrow [Y/G \times_Y G]
$$
is surjective, flat, and locally of finite presentation.
This is true because the base change by the surjective, flat,
locally finitely presented morphism $Y \to [Y/G \times_Y G]$
is the morphism $G \to Y$.

\medskip\noindent
Proof of (3). Observe that the diagram
$$
\xymatrix{
T_1 \times_{x_1, \mathcal{X}, x_2} T_2 \ar[d] \ar[r] &
T_1 \times_{y_1, \mathcal{Y}, y_2} T_2 \ar[d] \\
\mathcal{X} \ar[r] & \mathcal{X} \times_\mathcal{Y} \mathcal{X}
}
$$
is cartesian. Hence (3) follows from (2).

\medskip\noindent
Proof of (4). This is true because
$$
\mathit{Isom}_\mathcal{X}(x_1, x_2) =
(T \times_{x_1, \mathcal{X}, x_2} T) \times_{T \times T, \Delta_T} T
$$
hence the morphism in (4) is a base change of the morphism in (3).
\end{proof}

\begin{proposition}
\label{proposition-when-gerbe-over}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The following are equivalent
\begin{enumerate}
\item $\mathcal{X}$ is a gerbe over $\mathcal{Y}$, and
\item $f : \mathcal{X} \to \mathcal{Y}$ and
$\Delta : \mathcal{X} \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
are surjective, flat, and locally of finite presentation.
\end{enumerate}
\end{proposition}

\begin{proof}
The implication (1) $\Rightarrow$ (2) follows from
Lemmas \ref{lemma-gerbe-fppf} and \ref{lemma-gerbe-isom-fppf}.

\medskip\noindent
Assume (2). It suffices to prove (1) for the base change of $f$
by a surjective, flat, and locally finitely presented morphism
$\mathcal{Y}' \to \mathcal{Y}$, see
Lemma \ref{lemma-gerbe-descent} (note that the base change
of the diagonal of $f$ is the diagonal of the base change). 
Thus we may assume $\mathcal{Y}$ is a scheme $Y$.
In this case $\mathcal{I}_\mathcal{X} \to \mathcal{X}$
is a base change of $\Delta$ and
we conclude that $\mathcal{X}$ is a gerbe
by Proposition \ref{proposition-when-gerbe}.
We still have to show that $\mathcal{X}$ is a gerbe over $Y$.
Let $\mathcal{X} \to X$ be the morphism of
Lemma \ref{lemma-gerbe-over-iso-classes}
turning $\mathcal{X}$ into a gerbe over the algebraic space $X$
classifying isomorphism classes of objects of $\mathcal{X}$.
It is clear that $f : \mathcal{X} \to Y$ factors as
$\mathcal{X} \to X \to Y$. Since $f$ is surjective, flat, and
locally of finite presentation, we conclude that $X \to Y$ is
surjective as a map of fppf sheaves (for example use
Lemma \ref{lemma-surjective-flat-locally-finite-presentation}).
On the other hand, $X \to Y$ is injective too: for any scheme
$T$ and any two $T$-valued points $x_1, x_2$ of $X$ which map to
the same point of $Y$, we can first fppf locally on $T$
lift $x_1, x_2$ to objects $\xi_1, \xi_2$ of $\mathcal{X}$ over $T$
and second deduce that $\xi_1$ and $\xi_2$ are fppf locally isomorphic
by our assumption that
$\Delta : \mathcal{X} \to \mathcal{X} \times_Y \mathcal{X}$
is surjective, flat, and locally of finite presentation.
Whence $x_1 = x_2$ by construction of $X$.
Thus $X = Y$ and the proof is complete.
\end{proof}

\noindent
At this point we have developed enough machinery to prove that residual
gerbes (when they exist) are gerbes.

\begin{lemma}
\label{lemma-noetherian-singleton-stack-gerbe}
Let $\mathcal{Z}$ be a reduced, locally Noetherian algebraic stack
such that $|\mathcal{Z}|$ is a singleton. Then $\mathcal{Z}$ is a gerbe
over a reduced, locally Noetherian algebraic space $Z$ with $|Z|$ a
singleton.
\end{lemma}

\begin{proof}
By
Properties of Stacks, Lemma \ref{stacks-properties-lemma-unique-point-better}
there exists a surjective, flat, locally finitely presented morphism
$\Spec(k) \to \mathcal{Z}$ where $k$ is a field.
Then $\mathcal{I}_Z \times_\mathcal{Z} \Spec(k) \to \Spec(k)$
is representable by algebraic spaces and
locally of finite type (as a base change of
$\mathcal{I}_\mathcal{Z} \to \mathcal{Z}$, see
Lemmas \ref{lemma-inertia} and \ref{lemma-base-change-finite-type}).
Therefore it is locally of finite presentation, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-noetherian-finite-type-finite-presentation}.
Of course it is also flat as $k$ is a field. Hence we may apply
Lemmas \ref{lemma-descent-flat} and
\ref{lemma-descent-finite-presentation}
to see that $\mathcal{I}_\mathcal{Z} \to \mathcal{Z}$ is flat and
locally of finite presentation. We conclude that $\mathcal{Z}$
is a gerbe by
Proposition \ref{proposition-when-gerbe}.
Let $\pi : \mathcal{Z} \to Z$ be a morphism to an algebraic space such
that $\mathcal{Z}$ is a gerbe over $Z$. Then $\pi$ is surjective, flat, and
locally of finite presentation by
Lemma \ref{lemma-gerbe-fppf}.
Hence $\Spec(k) \to Z$ is surjective, flat, and locally of finite
presentation as a composition, see
Properties of Stacks,
Lemma \ref{stacks-properties-lemma-composition-surjective}
and
Lemmas \ref{lemma-composition-flat} and
\ref{lemma-composition-finite-presentation}.
Hence by
Properties of Stacks, Lemma \ref{stacks-properties-lemma-unique-point-better}
we see that $|Z|$ is a singleton and that $Z$ is locally Noetherian
and reduced.
\end{proof}

\begin{lemma}
\label{lemma-gerbe-bijection-points}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
If $\mathcal{X}$ is a gerbe over $\mathcal{Y}$ then $f$ is a
universal homeomorphism.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-base-change-gerbe} the assumption on $f$ is
preserved under base change. Hence it suffices to show that the map
$|\mathcal{X}| \to |\mathcal{Y}|$ is a homeomorphism of topological spaces.
Let $k$ be a field and let $y$ be an object
of $\mathcal{Y}$ over $\Spec(k)$. By
Stacks, Lemma \ref{stacks-lemma-when-gerbe} property (2)(a)
there exists an fppf covering $\{T_i \to \Spec(k)\}$
and objects $x_i$ of $\mathcal{X}$ over $T_i$ with $f(x_i) \cong y|_{T_i}$.
Choose an $i$ such that $T_i \not = \emptyset$. Choose a
morphism $\Spec(K) \to T_i$ for some field $K$.
Then $k \subset K$ and $x_i|_K$ is an object of $\mathcal{X}$ lying
over $y|_K$. Thus we see that
$|\mathcal{Y}| \to |\mathcal{X}|$. is surjective. The map
$|\mathcal{Y}| \to |\mathcal{X}|$ is also injective. Namely, if
$x, x'$ are objects of $\mathcal{X}$ over $\Spec(k)$ whose images
$f(x), f(x')$ become isomorphic (over an extension) in $\mathcal{Y}$, then
Stacks, Lemma \ref{stacks-lemma-when-gerbe} property (2)(b)
guarantees the existence of an extension of $k$ over which $x$ and $x'$
become isomorphic (details omitted).
Hence $|\mathcal{X}| \to |\mathcal{Y}|$ is continuous and bijective
and it suffices to show that it is also open.
This follows from
Lemmas \ref{lemma-gerbe-fppf} and \ref{lemma-fppf-open}.
\end{proof}

\begin{lemma}
\label{lemma-gerbe-diagonal-quasi-compact}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
such that $\mathcal{X}$ is a gerbe over $\mathcal{Y}$.
If $\Delta_\mathcal{X}$ is quasi-compact, so is $\Delta_\mathcal{Y}$.
\end{lemma}

\begin{proof}
Consider the diagram
$$
\xymatrix{
\mathcal{X} \ar[r] &
\mathcal{X} \times_\mathcal{Y} \mathcal{X} \ar[r] \ar[d] &
\mathcal{X} \times \mathcal{X} \ar[d] \\
&
\mathcal{Y} \ar[r] &
\mathcal{Y} \times \mathcal{Y}
}
$$
By Proposition \ref{proposition-when-gerbe-over} we find that
the arrow on the top left is surjective. Since the composition
of the top horizontal arrows is quasi-compact, we conclude
that the top right arrow is quasi-compact by
Lemma \ref{lemma-surjection-from-quasi-compact}.
The square is cartesian and the right vertical arrow is
surjective, flat, and locally of finite presentation.
Thus we conclude by Lemma \ref{lemma-descent-quasi-compact}.
\end{proof}

\noindent
The following lemma tells us that residual gerbes exist for all points
on any algebraic stack which is a gerbe.

\begin{lemma}
\label{lemma-gerbe-residual-gerbe-exists}
Let $\mathcal{X}$ be an algebraic stack. If $\mathcal{X}$ is a gerbe
then for every $x \in |\mathcal{X}|$ the residual gerbe of $\mathcal{X}$
at $x$ exists.
\end{lemma}

\begin{proof}
Let $\pi : \mathcal{X} \to X$ be a morphism from $\mathcal{X}$ into
an algebraic space $X$ which turns $\mathcal{X}$ into a gerbe over $X$.
Let $Z_x \to X$ be the residual space of $X$ at $x$, see
Decent Spaces, Definition \ref{decent-spaces-definition-residual-space}.
Let $\mathcal{Z} = \mathcal{X} \times_X Z_x$. By
Lemma \ref{lemma-base-change-gerbe}
the algebraic stack $\mathcal{Z}$ is a gerbe over $Z_x$.
Hence $|\mathcal{Z}| = |Z_x|$
(Lemma \ref{lemma-gerbe-bijection-points})
is a singleton. Since $\mathcal{Z} \to Z_x$ is locally of finite presentation
as a base change of $\pi$ (see
Lemmas \ref{lemma-gerbe-fppf} and \ref{lemma-base-change-finite-presentation})
we see that $\mathcal{Z}$ is locally Noetherian, see
Lemma \ref{lemma-locally-finite-type-locally-noetherian}.
Thus the residual gerbe $\mathcal{Z}_x$ of $\mathcal{X}$ at $x$
exists and is equal to $\mathcal{Z}_x = \mathcal{Z}_{red}$ the reduction
of the algebraic stack $\mathcal{Z}$. Namely, we have seen above
that $|\mathcal{Z}_{red}|$ is a singleton mapping to $x \in |\mathcal{X}|$,
it is reduced by construction, and it is locally Noetherian (as the
reduction of a locally Noetherian algebraic stack is locally Noetherian,
details omitted).
\end{proof}









\section{Stratification by gerbes}
\label{section-stratify}

\noindent
The goal of this section is to show that many algebraic stacks
$\mathcal{X}$ have a ``stratification'' by locally closed substacks
$\mathcal{X}_i \subset \mathcal{X}$ such that each $\mathcal{X}_i$ is
a gerbe. This shows that in some sense gerbes are the building blocks
out of which any algebraic stack is constructed. Note that by stratification
we only mean that
$$
|\mathcal{X}| = \bigcup\nolimits_i |\mathcal{X}_i|
$$
is a stratification of the topological space associated to $\mathcal{X}$
and nothing more (in this section). Hence it is harmless to replace
$\mathcal{X}$ by its reduction (see
Properties of Stacks, Section \ref{stacks-properties-section-reduced})
in order to study this stratification.

\medskip\noindent
The following proposition tells us there is (almost always) a dense
open substack of the reduction of $\mathcal{X}$

\begin{proposition}
\label{proposition-open-stratum}
Let $\mathcal{X}$ be a reduced algebraic stack such that
$\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is quasi-compact.
Then there exists a dense open substack $\mathcal{U} \subset \mathcal{X}$
which is a gerbe.
\end{proposition}

\begin{proof}
According to
Proposition \ref{proposition-when-gerbe}
it is enough to find a dense open substack $\mathcal{U}$ such that
$\mathcal{I}_\mathcal{U} \to \mathcal{U}$ is flat and locally of finite
presentation. Note that
$\mathcal{I}_\mathcal{U} =
\mathcal{I}_\mathcal{X} \times_\mathcal{X} \mathcal{U}$, see
Lemma \ref{lemma-cartesian-square-inertia}.

\medskip\noindent
Choose a presentation $\mathcal{X} = [U/R]$. Let $G \to U$ be the stabilizer
group algebraic space of the groupoid $R$. By
Lemma \ref{lemma-presentation-inertia}
we see that $G \to U$ is the base change of
$\mathcal{I}_\mathcal{X} \to \mathcal{X}$ hence quasi-compact (by assumption)
and locally of finite type (by
Lemma \ref{lemma-inertia}).
Let $W \subset U$ be the largest open (possibly empty) subscheme such that
the restriction $G_W \to W$ is flat and locally of finite presentation
(we omit the proof that $W$ exists; hint: use that the properties are local).
By
Morphisms of Spaces, Proposition
\ref{spaces-morphisms-proposition-generic-flatness-reduced}
we see that $W \subset U$ is dense. Note that $W \subset U$ is $R$-invariant
by
More on Groupoids in Spaces, Lemma
\ref{spaces-more-groupoids-lemma-property-G-invariant}.
Hence $W$ corresponds to an open substack $\mathcal{U} \subset \mathcal{X}$ by
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-substacks-presentation}.
Since $|U| \to |\mathcal{X}|$ is open and $|W| \subset |U|$ is dense we
conclude that $\mathcal{U}$ is dense in $\mathcal{X}$.
Finally, the morphism $\mathcal{I}_\mathcal{U} \to \mathcal{U}$
is flat and locally of finite presentation because the base change by
the surjective smooth morphism $W \to \mathcal{U}$ is the morphism
$G_W \to W$ which is flat and locally of finite presentation by construction.
See
Lemmas \ref{lemma-descent-flat} and
\ref{lemma-descent-finite-presentation}.
\end{proof}

\noindent
The above proposition immediately implies that any point has a residual
gerbe on an algebraic stack with quasi-compact inertia, as we will show in
Lemma \ref{lemma-every-point-residual-gerbe}.
It turns out that there doesn't always exist a finite stratification
by gerbes. Here is an example.

\begin{example}
\label{example-infinite-stratification}
Let $k$ be a field.
Take $U = \Spec(k[x_0, x_1, x_2, \ldots])$
and let $\mathbf{G}_m$ act by
$t(x_0, x_1, x_2, \ldots) = (tx_0, t^p x_1, t^{p^2} x_2, \ldots)$
where $p$ is a prime number. Let $\mathcal{X} = [U/\mathbf{G}_m]$.
This is an algebraic stack. There is a stratification of $\mathcal{X}$
by strata
\begin{enumerate}
\item $\mathcal{X}_0$ is where $x_0$ is not zero,
\item $\mathcal{X}_1$ is where $x_0$ is zero but $x_1$ is not zero,
\item $\mathcal{X}_2$ is where $x_0, x_1$ are zero, but $x_2$ is not zero,
\item and so on, and
\item $\mathcal{X}_{\infty}$ is where all the $x_i$ are zero.
\end{enumerate}
Each stratum is a gerbe over a scheme with group $\mu_{p^i}$ for
$\mathcal{X}_i$ and $\mathbf{G}_m$ for $\mathcal{X}_{\infty}$.
The strata are reduced locally closed substacks. There is no coarser
stratification with the same properties.
\end{example}

\noindent
Nonetheless, using transfinite induction we can use
Proposition \ref{proposition-open-stratum}
find possibly infinite stratifications by gerbes...!

\begin{lemma}
\label{lemma-every-point-in-a-stratum}
Let $\mathcal{X}$ be an algebraic stack such that
$\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is quasi-compact.
Then there exists a well-ordered index set $I$ and for every $i \in I$
a reduced locally closed substack $\mathcal{U}_i \subset \mathcal{X}$ such that
\begin{enumerate}
\item each $\mathcal{U}_i$ is a gerbe,
\item we have $|\mathcal{X}| = \bigcup_{i \in I} |\mathcal{U}_i|$,
\item $T_i = |\mathcal{X}| \setminus \bigcup_{i' < i} |\mathcal{U}_{i'}|$
is closed in $|\mathcal{X}|$ for all $i \in I$, and
\item $|\mathcal{U}_i|$ is open in $T_i$.
\end{enumerate}
We can moreover arrange it so that either (a) $|\mathcal{U}_i| \subset T_i$
is dense, or (b) $\mathcal{U}_i$ is quasi-compact. In case (a), if
we choose $\mathcal{U}_i$ as large as possible (see proof for details), then
the stratification is canonical.
\end{lemma}

\begin{proof}
Let $T \subset |\mathcal{X}|$ be a nonempty closed subset. We are going
to find (resp.\ choose) for every such $T$ a reduced locally closed substack
$\mathcal{U}(T) \subset \mathcal{X}$ with $|\mathcal{U}(T)| \subset T$
open dense (resp.\ nonempty quasi-compact). Namely, by
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-reduced-closed-substack}
there exists a unique reduced closed substack
$\mathcal{X}' \subset \mathcal{X}$ such that $T = |\mathcal{X}'|$.
Note that $\mathcal{I}_{\mathcal{X}'} =
\mathcal{I}_\mathcal{X} \times_\mathcal{X} \mathcal{X}'$ by
Lemma \ref{lemma-monomorphism-cartesian-square-inertia}.
Hence $\mathcal{I}_{\mathcal{X}'} \to \mathcal{X}'$ is
quasi-compact as a base change, see
Lemma \ref{lemma-base-change-quasi-compact}.
Therefore
Proposition \ref{proposition-open-stratum}
implies there exists a dense maximal (see proof proposition)
open substack $\mathcal{U} \subset \mathcal{X}'$
which is a gerbe. In case (a) we set $\mathcal{U}(T) = \mathcal{U}$
(this is canonical) and in case (b) we simply choose a nonempty quasi-compact
open $\mathcal{U}(T) \subset \mathcal{U}$, see
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-space-locally-quasi-compact}
(we can do this for all $T$
simultaneously by the axiom of choice).

\medskip\noindent
Using transfinite recursion we construct for every ordinal $\alpha$ a
closed subset $T_\alpha \subset |\mathcal{X}|$. For $\alpha = 0$
we set $T_0 = |\mathcal{X}|$. Given $T_\alpha$ set
$$
T_{\alpha + 1} = T_\alpha \setminus |\mathcal{U}(T_\alpha)|.
$$
If $\beta$ is a limit ordinal we set
$$
T_\beta = \bigcap\nolimits_{\alpha < \beta} T_\alpha.
$$
We claim that $T_\alpha = \emptyset$ for all $\alpha$
large enough. Namely, assume that $T_\alpha \not = \emptyset$
for all $\alpha$. Then we obtain an injective map from the class
of ordinals into the set of subsets of $|\mathcal{X}|$ which is a
contradiction.

\medskip\noindent
The claim implies the lemma. Namely, let
$$
I = \{\alpha \mid \mathcal{U}_\alpha \not = \emptyset \}.
$$
This is a well-ordered set by the claim. For $i = \alpha \in I$ we set
$\mathcal{U}_i = \mathcal{U}_\alpha$. So $\mathcal{U}_i$ is a reduced
locally closed substack and a gerbe, i.e., (1) holds. By construction
$T_i = T\alpha$ if $i = \alpha \in I$, hence (3) holds. Also, (4) and
(a) or (b) hold by our choice of $\mathcal{U}(T)$ as well. Finally, to see
(2) let $x \in |\mathcal{X}|$. There exists a smallest ordinal $\beta$
with $x \not \in T_\beta$ (because the ordinals are well-ordered).
In this case $\beta$ has to be a successor ordinal by the definition
of $T_\beta$ for limit ordinals. Hence $\beta = \alpha + 1$ and
$x \in |\mathcal{U}(T_\alpha)|$ and we win.
\end{proof}

\begin{remark}
\label{remark-order-type}
We can wonder about the order type of the canonical stratifications which
occur as output of the stratifications of type (a) constructed in
Lemma \ref{lemma-every-point-in-a-stratum}.
A natural guess is that the well-ordered set $I$ has
{\it cardinality} at most $\aleph_0$. We have no idea if this is true
or false. If you do please email
\href{mailto:stacks.project@gmail.com}{stacks.project@gmail.com}.
\end{remark}







\section{The topological space of an algebraic stack}
\label{section-topology}

\noindent
In this section we apply the previous results to the topological
space $|\mathcal{X}|$ associated to an algebraic stack.

\begin{lemma}
\label{lemma-spectral-qc-diagonal-qc}
Let $\mathcal{X}$ be a quasi-compact algebraic stack
whose diagonal $\Delta$ is quasi-compact.
Then $|\mathcal{X}|$ is a spectral topological space.
\end{lemma}

\begin{proof}
Choose an affine scheme $U$ and a surjective smooth morphism
$U \to \mathcal{X}$, see
Properties of Stacks, Lemma \ref{stacks-properties-lemma-quasi-compact-stack}.
Then $|U| \to |\mathcal{X}|$ is continuous, open, and surjective, see
Properties of Stacks, Lemma \ref{stacks-properties-lemma-topology-points}.
Hence the quasi-compact opens of $|\mathcal{X}|$ form a basis
for the topology. For $W_1, W_2 \subset |\mathcal{X}|$ quasi-compact open,
we may choose a quasi-compact opens $V_1, V_2$ of $U$ mapping
to $W_1$ and $W_2$. Since $\Delta$ is quasi-compact,
we see that
$$
V_1 \times_\mathcal{X} V_2 =
(V_1 \times V_2) \times_{\mathcal{X} \times \mathcal{X}, \Delta} \mathcal{X}
$$
is quasi-compact. Then image of $|V_1 \times_\mathcal{X} V_2|$ in
$|\mathcal{X}|$ is $W_1 \cap W_2$ by
Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian}.
Thus $W_1 \cap W_2$ is quasi-compact.
To finish the proof, it suffices to show that $|\mathcal{X}|$
is sober, see Topology, Definition \ref{topology-definition-spectral-space}.

\medskip\noindent
Let $T \subset |\mathcal{X}|$ be an irreducible closed subset.
We have to show $T$ has a unique generic point.
Let $\mathcal{Z} \subset \mathcal{X}$ be the reduced induced
closed substack corresponding to $T$, see
Properties of Stacks, Definition
\ref{stacks-properties-definition-reduced-induced-stack}.
Since $\mathcal{Z} \to \mathcal{X}$ is a closed immersion,
we see that $\Delta_\mathcal{Z}$ is quasi-compact:
first show that $\mathcal{Z} \to \mathcal{X} \times \mathcal{X}$
is quasi-compact as the composition of $\mathcal{Z} \to \mathcal{X}$
with $\Delta$, then write $\mathcal{Z} \to \mathcal{X} \times \mathcal{X}$
as the composition of $\Delta_\mathcal{Z}$ and
$\mathcal{Z} \times \mathcal{Z} \to \mathcal{X} \times \mathcal{X}$ and
use Lemma \ref{lemma-quasi-compact-permanence}
and the fact that
$\mathcal{Z} \times \mathcal{Z} \to \mathcal{X} \times \mathcal{X}$
is separated. Thus we reduce to the case discussed in the next
paragraph.

\medskip\noindent
Assume $\mathcal{X}$ is quasi-compact, $\Delta$ is quasi-compact,
$\mathcal{X}$ is reduced, and $|\mathcal{X}|$ irreducible.
We have to show $|\mathcal{X}|$ has a unique generic point.
Since $\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is a base change of $\Delta$,
we see that $\mathcal{I}_\mathcal{X} \to \mathcal{X}$
is quasi-compact (Lemma \ref{lemma-base-change-quasi-compact}).
Thus there exists a dense open substack $\mathcal{U} \subset \mathcal{X}$
which is a gerbe by
Proposition \ref{proposition-open-stratum}.
In other words, $|\mathcal{U}| \subset |\mathcal{X}|$
is open dense. Thus we may assume that $\mathcal{X}$ is a gerbe.
Say $\mathcal{X} \to X$ turns $\mathcal{X}$ into a gerbe over the
algebraic space $X$. Then $|\mathcal{X}| \cong |X|$ by
Lemma \ref{lemma-gerbe-bijection-points}.
In particular, $X$ is quasi-compact.
By Lemma \ref{lemma-gerbe-diagonal-quasi-compact}
we see that $X$ has quasi-compact diagonal,
i.e., $X$ is a quasi-separated algebraic space.
Then $|X|$ is spectral by
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-quasi-compact-quasi-separated-spectral}
which implies what we want is true.
\end{proof}

\begin{lemma}
\label{lemma-spectral-qcqs}
Let $\mathcal{X}$ be a quasi-compact and quasi-separated algebraic stack.
Then $|\mathcal{X}|$ is a spectral topological space.
\end{lemma}

\begin{proof}
This is a special case of Lemma \ref{lemma-spectral-qc-diagonal-qc}.
\end{proof}

\begin{lemma}
\label{lemma-sober-qs}
Let $\mathcal{X}$ be an algebraic stack whose diagonal is quasi-compact
(for example if $\mathcal{X}$ is quasi-separated).
Then there is an open covering $|\mathcal{X}| = \bigcup U_i$
with $U_i$ spectral. In particular $|\mathcal{X}|$ is
a sober topological space.
\end{lemma}

\begin{proof}
Immediate consequence of Lemma \ref{lemma-spectral-qc-diagonal-qc}.
\end{proof}






\section{Existence of residual gerbes}
\label{section-existence-residual-gerbes}

\noindent
In this section we prove that residual gerbes (as defined in
Properties of Stacks, Definition
\ref{stacks-properties-definition-residual-gerbe})
exist on many algebraic stacks. First, here is the promised
application of
Proposition \ref{proposition-open-stratum}.

\begin{lemma}
\label{lemma-every-point-residual-gerbe}
Let $\mathcal{X}$ be an algebraic stack such that
$\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is quasi-compact.
Then the residual gerbe of $\mathcal{X}$ at $x$ exists for
every $x \in |\mathcal{X}|$.
\end{lemma}

\begin{proof}
Let $T = \overline{\{x\}} \subset |\mathcal{X}|$ be the closure of $x$.
By
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-reduced-closed-substack}
there exists a reduced closed substack $\mathcal{X}' \subset \mathcal{X}$
such that $T = |\mathcal{X}'|$. Note that
$\mathcal{I}_{\mathcal{X}'} =
\mathcal{I}_\mathcal{X} \times_\mathcal{X} \mathcal{X}'$ by
Lemma \ref{lemma-monomorphism-cartesian-square-inertia}.
Hence $\mathcal{I}_{\mathcal{X}'} \to \mathcal{X}'$ is
quasi-compact as a base change, see
Lemma \ref{lemma-base-change-quasi-compact}.
Therefore
Proposition \ref{proposition-open-stratum}
implies there exists a dense open substack
$\mathcal{U} \subset \mathcal{X}'$
which is a gerbe. Note that $x \in |\mathcal{U}|$ because $\{x\} \subset T$
is a dense subset too. Hence a residual gerbe
$\mathcal{Z}_x \subset \mathcal{U}$ of $\mathcal{U}$ at $x$ exists by
Lemma \ref{lemma-gerbe-residual-gerbe-exists}.
It is immediate from the definitions that $\mathcal{Z}_x \to \mathcal{X}$
is a residual gerbe of $\mathcal{X}$ at $x$.
\end{proof}

\noindent
If the stack is quasi-DM then residual gerbes exist too.
In particular, residual gerbes always exist for Deligne-Mumford stacks.

\begin{lemma}
\label{lemma-every-point-residual-gerbe-quasi-DM}
Let $\mathcal{X}$ be a quasi-DM algebraic stack.
Then the residual gerbe of $\mathcal{X}$ at $x$ exists for
every $x \in |\mathcal{X}|$.
\end{lemma}

\begin{proof}
Choose a scheme $U$ and a surjective, flat, locally finite presented,
and locally quasi-finite morphism $U \to \mathcal{X}$, see
Theorem \ref{theorem-quasi-DM}.
Set $R = U \times_\mathcal{X} U$. The projections $s, t : R \to U$
are surjective, flat, locally of finite presentation, and
locally quasi-finite as base changes of the morphism $U \to \mathcal{X}$.
There is a canonical morphism $[U/R] \to \mathcal{X}$ (see
Algebraic Stacks, Lemma \ref{algebraic-lemma-map-space-into-stack})
which is an equivalence because $U \to \mathcal{X}$ is surjective, flat,
and locally of finite presentation, see
Algebraic Stacks, Remark \ref{algebraic-remark-flat-fp-presentation}.
Thus we may assume that $\mathcal{X} = [U/R]$ where
$(U, R, s, t, c)$ is a groupoid in algebraic spaces such that
$s, t : R \to U$ are surjective, flat, locally of finite presentation,
and locally quasi-finite. Set
$$
U' = \coprod\nolimits_{u \in U\text{ lying over }x} \Spec(\kappa(u)).
$$
The canonical morphism $U' \to U$ is a monomorphism. Let
$$
R' = U' \times_\mathcal{X} U' =
R \times_{(U \times U)} (U' \times U')
$$
Because $U' \to U$ is a monomorphism we see that both projections
$s', t' : R' \to U'$ factor as a monomorphism followed by a locally
quasi-finite morphism. Hence, as $U'$ is a disjoint union of spectra
of fields, using
Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-mono-towards-locally-quasi-finite-over-field}
we conclude that the morphisms $s', t' : R' \to U'$ are locally quasi-finite.
Again since $U'$ is a disjoint union of spectra of fields, the morphisms
$s', t'$ are also flat. Finally, $s', t'$ locally quasi-finite
implies $s', t'$ locally of finite type, hence $s', t'$ locally of finite
presentation (because $U'$ is a disjoint union of spectra of fields
in particular locally Noetherian, so that
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-noetherian-finite-type-finite-presentation}
applies). Hence $\mathcal{Z} = [U'/R']$ is an algebraic stack by
Criteria for Representability, Theorem
\ref{criteria-theorem-flat-groupoid-gives-algebraic-stack}.
As $R'$ is the restriction of $R$ by $U' \to U$ we see
$\mathcal{Z} \to \mathcal{X}$ is a monomorphism by
Groupoids in Spaces, Lemma
\ref{spaces-groupoids-lemma-quotient-stack-restrict}
and
Properties of Stacks, Lemma \ref{stacks-properties-lemma-monomorphism}.
Since $\mathcal{Z} \to \mathcal{X}$ is a monomorphism we see that
$|\mathcal{Z}| \to |\mathcal{X}|$ is injective, see
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-monomorphism-injective-points}.
By
Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian}
we see that
$$
|U'| = |\mathcal{Z} \times_\mathcal{X} U'|
\longrightarrow
|\mathcal{Z}| \times_{|\mathcal{X}|} |U'|
$$
is surjective which implies (by our choice of $U'$) that
$|\mathcal{Z}| \to |\mathcal{X}|$ has image $\{x\}$.
We conclude that $|\mathcal{Z}|$ is a singleton.
Finally, by construction $U'$ is locally Noetherian and reduced, i.e.,
$\mathcal{Z}$ is reduced and locally Noetherian. This means that
the essential image of $\mathcal{Z} \to \mathcal{X}$
is the residual gerbe of $\mathcal{X}$ at $x$, see
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-residual-gerbe-unique}.
\end{proof}



\section{\'Etale local structure}
\label{section-etale-local}

\noindent
In this section we start discussing what we can say
about the \'etale local structure of an algebraic stack.

\begin{lemma}
\label{lemma-quotient-etale}
Let $Y$ be an algebraic space.
Let $(U, R, s, t, c)$ be a groupoid in algebraic spaces over $Y$.
Assume $U \to Y$ is flat and locally of finite presentation
and $R \to U \times_Y U$ an open immersion.
Then $X = [U/R] = U/R$ is an algebraic space and $X \to Y$
is \'etale.
\end{lemma}

\begin{proof}
The quotient stack $[U/R]$ is an algebraic stacks by
Criteria for Representability, Theorem
\ref{criteria-theorem-flat-groupoid-gives-algebraic-stack}.
On the other hand, since $R \to U \times U$ is a monomorphism,
it is an algebraic space (by our abuse of language and
Algebraic Stacks, Proposition
\ref{algebraic-proposition-algebraic-stack-no-automorphisms})
and of course it is equal to the algebraic space $U/R$
(of Bootstrap, Theorem \ref{bootstrap-theorem-final-bootstrap}).
Since $U \to X$ is surjective, flat, and locally of finite presenation
(Bootstrap, Lemma \ref{bootstrap-lemma-covering-quotient})
we conclude that $X \to Y$ is flat and locally of finite presentation by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-permanence}
and
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-flat-finitely-presented-permanence}.
Finally, consider the cartesian diagram
$$
\xymatrix{
R \ar[d] \ar[r] & U \times_Y U \ar[d] \\
X \ar[r] & X \times_Y X
}
$$
Since the right vertical arrow is surjective, flat, and
locally of finite presentation (small detail omitted), we
find that $X \to X \times_Y X$ is an open immersion as the top horizonal arrow
has this property by assumption (use
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-check-property-covering}).
Thus $X \to Y$ is unramified by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-diagonal-unramified-morphism}.
We conclude by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-unramified-flat-lfp-etale}.
\end{proof}

\begin{lemma}
\label{lemma-quasi-splitting-etale}
Let $S$ be a scheme.
Let $(U, R, s, t, c)$ be a groupoid in algebraic spaces over $S$.
Assume $s, t$ are flat and locally of finite presentation.
Let $P \subset R$ be an open subspace such that
$(U, P, s|_P, t|_P, c|_{P \times_{s, U, t} P})$ is a
groupoid in algebraic spaces over $S$. Then
$$
[U/P] \longrightarrow [U/R]
$$
is a morphism of algebraic stacks which
is representable by algebraic spaces, surjective, and \'etale.
\end{lemma}

\begin{proof}
Since $P \subset R$ is open, we see that $s|_P$ and $t|_P$
are flat and locally of finite presentation.
Thus $[U/R]$ and $[U/P]$ are algebraic stacks by
Criteria for Representability, Theorem
\ref{criteria-theorem-flat-groupoid-gives-algebraic-stack}.
To see that the morphism is representable by algebraic spaces,
it suffices to show that $[U/P] \to [U/R]$ is faithful on
fibre categories, see
Algebraic Stacks, Lemma
\ref{algebraic-lemma-characterize-representable-by-algebraic-spaces}.
This follows immediately from the fact that $P \to R$ is a monomorphism
and the explicit description of quotient stacks given in
Groupoids in Spaces, Lemma
\ref{spaces-groupoids-lemma-quotient-stack-objects}.
Having said this, we know what it means for
$[U/P] \to [U/R]$ to be surjective and \'etale by
Algebraic Stacks, Definition
\ref{algebraic-definition-relative-representable-property}.
Surjectivity follows for example from
Criteria for Representability,
Lemma \ref{criteria-lemma-representable-by-spaces-surjective}
and the description of objects of quotient stacks
(see lemma cited above) over spectra of fields.
It remains to prove that our morphism is \'etale.

\medskip\noindent
To do this it suffices to show that $U \times_{[U/R]} [U/P] \to U$
is \'etale, see Properties of Stacks, Lemma
\ref{stacks-properties-lemma-check-property-covering}.
By Groupoids in Spaces, Lemma
\ref{spaces-groupoids-lemma-cartesian-square-of-morphism}
the fibre product is equal to $[R/P \times_{s, U, t} R]$
with morphism to $U$ induced by $s : R \to U$.
The maps $s', t' : P \times_{s, U, t} R \to R$ are given by
$s' : (p, r) \mapsto r$ and $t' : (p, r) \mapsto c(p, r)$. Since
$P \subset R$ is open we conclude that
$(t', s') : P \times_{s, U, t} R \to R \times_{s, U, s} R$
is an open immersion.
Thus we may apply Lemma \ref{lemma-quotient-etale}
to conclude.
\end{proof}

\begin{lemma}
\label{lemma-etale-local-quasi-DM}
Let $\mathcal{X}$ be an algebraic stack. Assume $\mathcal{X}$ is
quasi-DM with separated diagonal (equivalently
$\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is locally quasi-finite and
separated). Let $x \in |\mathcal{X}|$. Then there exists a
morphism of algebraic stacks
$$
\mathcal{U} \longrightarrow \mathcal{X}
$$
with the following properties
\begin{enumerate}
\item there exists a point $u \in |\mathcal{U}|$ mapping to $x$,
\item $\mathcal{U} \to \mathcal{X}$ is representable by algebraic spaces and
\'etale,
\item $\mathcal{U} = [U/R]$ where $(U, R, s, t, c)$ is a groupoid
scheme with $U$, $R$ affine, and $s, t$ finite, flat, and
locally of finite presentation.
\end{enumerate}
\end{lemma}

\begin{proof}
(The parenthetical statement follows from the equivalences in
Lemma \ref{lemma-diagonal-diagonal}).
Choose an affine scheme $U$ and a flat, locally finitely presented,
locally quasi-finite morphism $U \to \mathcal{X}$ such that $x$
is the image of some point $u \in U$. This is possible by
Theorem \ref{theorem-quasi-DM} and the assumption that $\mathcal{X}$
is quasi-DM. Let $(U, R, s, t, c)$ be the groupoid in algebraic spaces
we obtain by setting $R = U \times_\mathcal{X} U$, see
Algebraic Stacks, Lemma \ref{algebraic-lemma-map-space-into-stack}.
Let $\mathcal{X}' \subset \mathcal{X}$ be the open substack corresponding
to the open image of $|U| \to |\mathcal{X}|$
(Properties of Stacks, Lemmas
\ref{stacks-properties-lemma-topology-points} and
\ref{stacks-properties-lemma-open-substacks}).
Clearly, we may replace $\mathcal{X}$ by the open substack $\mathcal{X}'$.
Thus we may assume $U \to \mathcal{X}$ is surjective and then
Algebraic Stacks, Remark \ref{algebraic-remark-flat-fp-presentation}
gives $\mathcal{X} = [U/R]$.
Observe that $s, t : R \to U$ are flat, locally of finite presentation,
and locally quasi-finite.
Since $R = U \times U \times_{(\mathcal{X} \times \mathcal{X})} \mathcal{X}$
and since the diagonal of $\mathcal{X}$ is separated, we find that
$R$ is separated. Hence $s, t : R \to U$ are separated. It follows
that $R$ is a scheme by
Morphisms of Spaces, Proposition
\ref{spaces-morphisms-proposition-locally-quasi-finite-separated-over-scheme}
applied to $s : R \to U$.

\medskip\noindent
Above we have verified all the assumptions of
More on Groupoids in Spaces, Lemma
\ref{spaces-more-groupoids-lemma-quasi-splitting-affine-scheme}
are satisfied for $(U, R, s, t, c)$ and $u$.
Hence we can find an elementary \'etale neighbourhood
$(U', u') \to (U, u)$ such that the restriction $R'$ of $R$ to $U'$
is quasi-split over $u$. Note that $R' = U' \times_\mathcal{X} U'$
(small detail omitted; hint: transitivity of fibre products).
Replacing $(U, R, s, t, c)$ by $(U', R', s', t', c')$ and shrinking
$\mathcal{X}$ as above, we may assume that $(U, R, s, t, c)$ has
a quasi-splitting over $u$ (the point $u$ is irrelevant from
now on as can be seen from the footnote in
More on Groupoids in Spaces, Definition
\ref{spaces-more-groupoids-definition-split-at-point}).
Let $P \subset R$ be a quasi-splitting of $R$ over $u$.
Apply Lemma \ref{lemma-quasi-splitting-etale}
to see that
$$
\mathcal{U} = [U/P] \longrightarrow [U/R] = \mathcal{X}
$$
has all the desired properties.
\end{proof}

\begin{lemma}
\label{lemma-etale-local-quasi-DM-at-x}
Let $\mathcal{X}$ be an algebraic stack. Assume $\mathcal{X}$ is
quasi-DM with separated diagonal (equivalently
$\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is locally quasi-finite and
separated). Let $x \in |\mathcal{X}|$. Assume the
automorphism group of $\mathcal{X}$ at $x$ is finite
(Remark \ref{remark-property-automorphism-groups}).
Then there exists a morphism of algebraic stacks
$$
g : \mathcal{U} \longrightarrow \mathcal{X}
$$
with the following properties
\begin{enumerate}
\item there exists a point $u \in |\mathcal{U}|$ mapping to $x$ and
$g$ induces an isomorphism between automorphism groups at $u$ and $x$
(Remark \ref{remark-identify-automorphism-groups}),
\item $\mathcal{U} \to \mathcal{X}$ is representable by algebraic spaces and
\'etale,
\item $\mathcal{U} = [U/R]$ where $(U, R, s, t, c)$ is a groupoid
scheme with $U$, $R$ affine, and $s, t$ finite, flat, and
locally of finite presentation.
\end{enumerate}
\end{lemma}

\begin{proof}
Observe that $G_x$ is a group scheme by
Lemma \ref{lemma-automorphism-group-scheme}.
The first part of the proof is {\bf exactly} the same as the first part
of the proof of Lemma \ref{lemma-etale-local-quasi-DM}.
Thus we may assume $\mathcal{X} = [U/R]$ where $(U, R, s, t, c)$
and $u \in U$ mapping to $x$ satisfy all the assumptions of
More on Groupoids in Spaces, Lemma
\ref{spaces-more-groupoids-lemma-quasi-splitting-affine-scheme}.
Our assumption on $G_x$ implies that $G_u$ is finite over $u$.
Hence all the assumptions of
More on Groupoids in Spaces, Lemma
\ref{spaces-more-groupoids-lemma-splitting-affine-scheme}
are satisfied.
Hence we can find an elementary \'etale neighbourhood
$(U', u') \to (U, u)$ such that the restriction $R'$ of $R$ to $U'$
is split over $u$. Note that $R' = U' \times_\mathcal{X} U'$
(small detail omitted; hint: transitivity of fibre products).
Replacing $(U, R, s, t, c)$ by $(U', R', s', t', c')$ and shrinking
$\mathcal{X}$ as above, we may assume that $(U, R, s, t, c)$ has
a splitting over $u$. Let $P \subset R$ be a splitting of $R$ over $u$.
Apply Lemma \ref{lemma-quasi-splitting-etale} to see that
$$
\mathcal{U} = [U/P] \longrightarrow [U/R] = \mathcal{X}
$$
is representable by algebraic spaces and \'etale. By construction
$G_u$ is contained in $P$, hence this morphism defines an isomorphism
on automorphism groups at $u$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-etale-local-quasi-DM-at-x-inertia}
Let $\mathcal{X}$ be an algebraic stack. Assume $\mathcal{X}$ is
quasi-DM with separated diagonal (equivalently
$\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is locally quasi-finite and
separated). Let $x \in |\mathcal{X}|$. Assume $x$ can be represented
by a quasi-compact morphism $\Spec(k) \to \mathcal{X}$.
Then there exists a morphism of algebraic stacks
$$
g : \mathcal{U} \longrightarrow \mathcal{X}
$$
with the following properties
\begin{enumerate}
\item there exists a point $u \in |\mathcal{U}|$ mapping to $x$ and
$g$ induces an isomorphism between the residual gerbes at $u$ and $x$,
\item $\mathcal{U} \to \mathcal{X}$ is representable by algebraic spaces and
\'etale,
\item $\mathcal{U} = [U/R]$ where $(U, R, s, t, c)$ is a groupoid
scheme with $U$, $R$ affine, and $s, t$ finite, flat, and
locally of finite presentation.
\end{enumerate}
\end{lemma}

\begin{proof}
The first part of the proof is {\bf exactly} the same as the first part
of the proof of Lemma \ref{lemma-etale-local-quasi-DM}.
Thus we may assume $\mathcal{X} = [U/R]$ where $(U, R, s, t, c)$
and $u \in U$ mapping to $x$ satisfy all the assumptions of
More on Groupoids in Spaces, Lemma
\ref{spaces-more-groupoids-lemma-quasi-splitting-affine-scheme}.
Observe that $u = \Spec(\kappa(u)) \to \mathcal{X}$ is quasi-compact, see
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-UR-quasi-compact-above-x}.
Consider the cartesian diagram
$$
\xymatrix{
F \ar[d] \ar[r] & U \ar[d] \\
u \ar[r]^u & \mathcal{X}
}
$$
Since $U$ is an affine scheme and $F \to U$ is quasi-compact,
we see that $F$ is quasi-compact. Since $U \to \mathcal{X}$
is locally quasi-finite, we see that $F \to u$ is
locally quasi-finite. Hence $F \to u$ is quasi-finite
and $F$ is an affine scheme whose underlying topological
space is finite discrete (Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-locally-quasi-finite-over-field}).
Observe that we have a monomorphism $u \times_\mathcal{X} u \to F$.
In particular the set $\{r \in R : s(r) = u, t(r) = u\}$
which is the image of $|u \times_\mathcal{X} u| \to |R|$
is finite. we conclude that all the assumptions of
More on Groupoids in Spaces, Lemma
\ref{spaces-more-groupoids-lemma-strong-splitting-affine-scheme}
hold.

\medskip\noindent
Thus we can find an elementary \'etale neighbourhood
$(U', u') \to (U, u)$ such that the restriction $R'$ of $R$ to $U'$
is strongly split over $u'$. Note that $R' = U' \times_\mathcal{X} U'$
(small detail omitted; hint: transitivity of fibre products).
Replacing $(U, R, s, t, c)$ by $(U', R', s', t', c')$ and shrinking
$\mathcal{X}$ as above, we may assume that $(U, R, s, t, c)$ has
a strong splitting over $u$. Let $P \subset R$ be a strong splitting
of $R$ over $u$. Apply Lemma \ref{lemma-quasi-splitting-etale} to see that
$$
\mathcal{U} = [U/P] \longrightarrow [U/R] = \mathcal{X}
$$
is representable by algebraic spaces and \'etale. Since $P \subset R$
is open and contains $\{r \in R : s(r) = u, t(r) = u\}$ by construction
we see that
$u \times_\mathcal{U} u \to u \times_\mathcal{X} u$ is an isomorphism.
The statement on residual gerbes then follows from
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-residual-gerbe-isomorphic}
(we observe that the residual gerbes in question exist by
Lemma \ref{lemma-every-point-residual-gerbe-quasi-DM}).
\end{proof}







\section{Smooth morphisms}
\label{section-smooth}

\noindent
The property ``being smooth'' of morphisms of algebraic
spaces is smooth local on the source-and-target, see
Descent on Spaces, Remark \ref{spaces-descent-remark-list-local-source-target}.
It is also stable under base change and fpqc local on the target, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-base-change-smooth}
and
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-smooth}.
Hence, by
Lemma \ref{lemma-local-source-target}
above, we may define what it means for a morphism of algebraic spaces
to be smooth as follows and it agrees with the already
existing notion defined in
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}
when the morphism is representable by algebraic spaces.

\begin{definition}
\label{definition-smooth}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $f$ is {\it smooth} if the equivalent conditions of
Lemma \ref{lemma-local-source-target}
hold with $\mathcal{P} = \text{smooth}$.
\end{definition}

\begin{lemma}
\label{lemma-composition-smooth}
The composition of smooth morphisms is smooth.
\end{lemma}

\begin{proof}
Combine
Remark \ref{remark-composition}
with
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-composition-smooth}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-smooth}
A base change of a smooth morphism is smooth.
\end{lemma}

\begin{proof}
Combine
Remark \ref{remark-base-change}
with
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-base-change-smooth}.
\end{proof}

\begin{lemma}
\label{lemma-descent-smooth}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $\mathcal{Z} \to \mathcal{Y}$ be a surjective, flat, locally finitely
presented morphism of algebraic stacks. If the base change
$\mathcal{Z} \times_\mathcal{Y} \mathcal{X} \to \mathcal{Z}$
is smooth, then $f$ is smooth.
\end{lemma}

\begin{proof}
The property ``smooth''
satisfies the conditions of Lemma \ref{lemma-descent-property}.
Smooth local on the source-and-target we have seen in the
introduction to this section and fppf local on the target is
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-smooth}.
\end{proof}

\begin{lemma}
\label{lemma-smooth-locally-finite-presentation}
A smooth morphism of algebraic stacks is locally of finite presentation.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-where-smooth}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
There is a maximal open substack $\mathcal{U} \subset \mathcal{X}$
such that $f|_\mathcal{U} : \mathcal{U} \to \mathcal{Y}$ is smooth.
Moreover, formation of this open commutes with
\begin{enumerate}
\item precomposing by smooth morphisms,
\item base change by morphisms which are flat and locally of
finite presentation,
\item base change by flat morphisms provided $f$ is locally of
finite presentation.
\end{enumerate}
\end{lemma}

\begin{proof}
Choose a commutative diagram
$$
\xymatrix{
U \ar[d]_a \ar[r]_h & V \ar[d]^b \\
\mathcal{X} \ar[r]^f & \mathcal{Y}
}
$$
where $U$ and $V$ are algebraic spaces, the vertical arrows are smooth,
and $a : U \to \mathcal{X}$ surjective. There is a maximal open subspace
$U' \subset U$ such that $h_{U'} : U' \to V$ is smooth, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-where-smooth}.
Let $\mathcal{U} \subset \mathcal{X}$ be the open substack
corresponding to the image of $|U'| \to |\mathcal{X}|$
(Properties of Stacks, Lemmas \ref{stacks-properties-lemma-topology-points} and
\ref{stacks-properties-lemma-open-substacks}).
By the equivalence in Lemma \ref{lemma-local-source-target}
we find that $f|_\mathcal{U} : \mathcal{U} \to \mathcal{Y}$ is smooth
and that $\mathcal{U}$ is the largest open substack with this
property.

\medskip\noindent
Assertion (1) follows from the fact that being smooth
is smooth local on the source (this property was used to even define
smooth morphisms of algebraic stacks).
Assertions (2) and (3) follow from the case of algebraic spaces, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-where-smooth}.
\end{proof}

\begin{lemma}
\label{lemma-smooth-quotient-stack}
Let $X \to Y$ be a smooth morphism of algebraic spaces.
Let $G$ be a group algebraic space over $Y$ which is flat
and locally of finite presentation over $Y$. Let $G$ act on $X$ over $Y$.
Then the quotient stack $[X/G]$ is smooth over $Y$.
\end{lemma}

\noindent
This holds even if $G$ is not smooth over $S$!

\begin{proof}
The quotient $[X/G]$ is an algebraic stack by
Criteria for Representability, Theorem
\ref{criteria-theorem-flat-groupoid-gives-algebraic-stack}.
The smoothness of $[X/G]$ over $Y$ follows from the fact that smoothness
descends under fppf coverings:
Choose a surjective smooth morphism $U \to [X/G]$ where $U$ is a scheme.
Smoothness of $[X/G]$ over $Y$ is equivalent to smoothness of $U$ over $Y$.
Observe that $U \times_{[X/G]} X$ is smooth over $X$ and hence smooth
over $Y$ (because compositions of smooth morphisms are smooth).
On the other hand, $U \times_{[X/G]} X \to U$ is locally of
finite presentation, flat, and surjective (because it is
the base change of $X \to [X/G]$ which has those properties
for example by Criteria for Representability, Lemma
\ref{criteria-lemma-flat-quotient-flat-presentation}).
Therefore we may apply Descent on Spaces,
Lemma \ref{spaces-descent-lemma-smooth-permanence}.
\end{proof}

\begin{lemma}
\label{lemma-gerbe-smooth}
Let $\pi : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
If $\mathcal{X}$ is a gerbe over $\mathcal{Y}$, then $\pi$ is surjective
and smooth.
\end{lemma}

\begin{proof}
We have seen surjectivity in Lemma \ref{lemma-gerbe-fppf}.
By Lemma \ref{lemma-descent-smooth}
it suffices to prove to the lemma after replacing $\pi$ by a base change
with a surjective, flat, locally finitely presented morphism
$\mathcal{Y}' \to \mathcal{Y}$. By
Lemma \ref{lemma-local-structure-gerbe}
we may assume $\mathcal{Y} = U$ is an algebraic space and
$\mathcal{X} = [U/G]$ over $U$ with $G \to U$ flat and
locally of finite presentation.
Then we win by Lemma \ref{lemma-smooth-quotient-stack}.
\end{proof}





\section{Types of morphisms \'etale-smooth local on source-and-target}
\label{section-etale-smooth-local-source-target}

\noindent
Given a property of morphisms of algebraic spaces which is
{\it \'etale-smooth local on the source-and-target}, see
Descent on Spaces,
Definition \ref{spaces-descent-definition-etale-smooth-local-source-target}
we may use it to define a corresponding
property of DM morphisms of algebraic stacks, namely by imposing either of
the equivalent conditions of the lemma below.

\begin{lemma}
\label{lemma-etale-smooth-local-source-target}
Let $\mathcal{P}$ be a property of morphisms of algebraic spaces
which is \'etale-smooth local on the source-and-target.
Let $f : \mathcal{X} \to \mathcal{Y}$ be a DM morphism of algebraic stacks.
Consider commutative diagrams
$$
\xymatrix{
U \ar[d]_a \ar[r]_h & V \ar[d]^b \\
\mathcal{X} \ar[r]^f & \mathcal{Y}
}
$$
where $U$ and $V$ are algebraic spaces, $V \to \mathcal{Y}$ is smooth,
and $U \to \mathcal{X} \times_\mathcal{Y} V$ is \'etale.
The following are equivalent
\begin{enumerate}
\item for any diagram as above the morphism $h$ has property $\mathcal{P}$, and
\item for some diagram as above with $a : U \to \mathcal{X}$ surjective
the morphism $h$ has property $\mathcal{P}$.
\end{enumerate}
If $\mathcal{X}$ and $\mathcal{Y}$ are representable by algebraic spaces,
then this is also equivalent to $f$ (as a morphism of algebraic spaces)
having property $\mathcal{P}$. If $\mathcal{P}$ is also preserved under
any base change, and fppf local on the base, then for morphisms $f$
which are representable by algebraic spaces this
is also equivalent to $f$ having property $\mathcal{P}$ in the sense
of
Properties of Stacks,
Section \ref{stacks-properties-section-properties-morphisms}.
\end{lemma}

\begin{proof}
Let us prove the implication (1) $\Rightarrow$ (2). Pick an algebraic
space $V$ and a surjective and smooth morphism $V \to \mathcal{Y}$.
As $f$ is DM there exists a scheme $U$ and a surjective \'etale morphism
$U \to V \times_\mathcal{Y} \mathcal{X}$, see
Lemma \ref{lemma-DM}. Thus we see that (2) holds.
Note that $U \to \mathcal{X}$ is surjective and smooth as well, as a
composition of the base change
$\mathcal{X} \times_\mathcal{Y} V \to \mathcal{X}$ and the chosen
map $U \to \mathcal{X} \times_\mathcal{Y} V$. Hence we obtain a
diagram as in (1). Thus if (1) holds, then $h : U \to V$ has property
$\mathcal{P}$, which means that (2) holds as $U \to \mathcal{X}$ is surjective.

\medskip\noindent
Conversely, assume (2) holds and let $U, V, a, b, h$ be as in (2).
Next, let $U', V', a', b', h'$ be any diagram as in (1).
Picture
$$
\xymatrix{
U \ar[d] \ar[r]_h & V \ar[d] \\
\mathcal{X} \ar[r]^f & \mathcal{Y}
}
\quad\quad
\xymatrix{
U' \ar[d] \ar[r]_{h'} & V' \ar[d] \\
\mathcal{X} \ar[r]^f & \mathcal{Y}
}
$$
To show that (2) implies (1) we have to prove that $h'$ has $\mathcal{P}$.
To do this consider the commutative diagram
$$
\xymatrix{
U \ar[d]^h &
U \times_\mathcal{X} U' \ar[l] \ar[d]^{(h, h')} \ar[r] &
U' \ar[d]^{h'} \\
V &
V \times_\mathcal{Y} V' \ar[l] \ar[r] &
V'
}
$$
of algebraic spaces. Note that the horizontal arrows are
smooth as base changes of the smooth morphisms
$V \to \mathcal{Y}$, $V' \to \mathcal{Y}$, $U \to \mathcal{X}$, and
$U' \to \mathcal{X}$. Note that the squares
$$
\xymatrix{
U \ar[d] & U \times_\mathcal{X} U' \ar[l] \ar[d] &
U \times_\mathcal{X} U' \ar[d] \ar[r] & U' \ar[d] \\
V \times_\mathcal{Y} \mathcal{X} &
V \times_\mathcal{Y} U' \ar[l] &
U \times_\mathcal{Y} V' \ar[r] &
\mathcal{X} \times_\mathcal{Y} V'
}
$$
are cartesian, hence the vertical arrows are \'etale by our assumptions on
$U', V', a', b', h'$ and $U, V, a, b, h$.
Since $\mathcal{P}$ is smooth local on the target by
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-etale-smooth-local-source-target-implies} part (2)
we see that the base change
$t : U \times_\mathcal{Y} V' \to V \times_\mathcal{Y} V'$ of $h$
has $\mathcal{P}$. Since $\mathcal{P}$ is \'etale local on the source by
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-etale-smooth-local-source-target-implies} part (1)
and $s : U \times_\mathcal{X} U' \to U \times_\mathcal{Y} V'$ is \'etale,
we see the morphism $(h, h') = t \circ s$ has $\mathcal{P}$.
Consider the diagram
$$
\xymatrix{
U \times_\mathcal{X} U' \ar[r]_{(h, h')} \ar[d] &
V \times_\mathcal{Y} V' \ar[d] \\
U' \ar[r]^{h'} & V'
}
$$
The left vertical arrow is surjective, the right vertical arrow is smooth, and
the induced morphism
$$
U \times_\mathcal{X} U'
\longrightarrow
U' \times_{V'} (V \times_\mathcal{Y} V') = V \times_\mathcal{Y} U'
$$
is \'etale as seen above. Hence by
Descent on Spaces, Definition
\ref{spaces-descent-definition-etale-smooth-local-source-target} part (3)
we conclude that $h'$ has $\mathcal{P}$. This finishes the proof of the
equivalence of (1) and (2).

\medskip\noindent
If $\mathcal{X}$ and $\mathcal{Y}$ are representable, then
Descent on Spaces,
Lemma \ref{spaces-descent-lemma-etale-smooth-local-source-target-characterize}
applies which shows that (1) and (2) are equivalent to $f$ having
$\mathcal{P}$.

\medskip\noindent
Finally, suppose $f$ is representable, and $U, V, a, b, h$ are
as in part (2) of the lemma, and that $\mathcal{P}$ is preserved under
arbitrary base change. We have to show that for any scheme
$Z$ and morphism $Z \to \mathcal{X}$ the base change
$Z \times_\mathcal{Y} \mathcal{X} \to Z$
has property $\mathcal{P}$. Consider the diagram
$$
\xymatrix{
Z \times_\mathcal{Y} U \ar[d] \ar[r] &
Z \times_\mathcal{Y} V \ar[d] \\
Z \times_\mathcal{Y} \mathcal{X} \ar[r] &
Z
}
$$
Note that the top horizontal arrow is a base change of $h$ and
hence has property $\mathcal{P}$. The left vertical arrow is
surjective, the induced morphism
$$
Z \times_\mathcal{Y} U \longrightarrow
(Z \times_\mathcal{Y} \mathcal{X}) \times_Z (Z \times_\mathcal{Y} V)
$$
is \'etale, and the right vertical arrow is smooth. Thus
Descent on Spaces,
Lemma \ref{spaces-descent-lemma-etale-smooth-local-source-target-characterize}
kicks in and shows that $Z \times_\mathcal{Y} \mathcal{X} \to Z$
has property $\mathcal{P}$.
\end{proof}

\begin{definition}
\label{definition-etale-smooth-P}
Let $\mathcal{P}$ be a property of morphisms of algebraic spaces
which is \'etale-smooth local on the source-and-target.
We say a DM morphism $f : \mathcal{X} \to \mathcal{Y}$ of algebraic stacks
{\it has property $\mathcal{P}$} if the equivalent conditions of
Lemma \ref{lemma-local-source-target}
hold.
\end{definition}

\begin{remark}
\label{remark-etale-smooth-composition}
Let $\mathcal{P}$ be a property of morphisms of algebraic spaces
which is \'etale-smooth local on the source-and-target and
stable under composition. Then the property of DM morphisms of algebraic stacks
defined in Definition \ref{definition-etale-smooth-P}
is stable under composition. Namely, let $f : \mathcal{X} \to \mathcal{Y}$
and $g : \mathcal{Y} \to \mathcal{Z}$ be DM morphisms of algebraic stacks
having property $\mathcal{P}$. By Lemma \ref{lemma-composition-separated}
the composition $g \circ f$ is DM. Choose an algebraic space $W$ and a
surjective smooth morphism $W \to \mathcal{Z}$. Choose an algebraic space
$V$ and a surjective \'etale morphism $V \to \mathcal{Y} \times_\mathcal{Z} W$
(Lemma \ref{lemma-DM}).
Choose an algebraic space $U$ and a surjective \'etale morphism
$U \to \mathcal{X} \times_\mathcal{Y} V$. Then the morphisms
$V \to W$ and $U \to V$ have property $\mathcal{P}$ by definition.
Whence $U \to W$ has property $\mathcal{P}$ as we assumed that
$\mathcal{P}$ is stable under composition. Thus, by definition again,
we see that $g \circ f : \mathcal{X} \to \mathcal{Z}$ has
property $\mathcal{P}$.
\end{remark}

\begin{remark}
\label{remark-etale-smooth-base-change}
Let $\mathcal{P}$ be a property of morphisms of algebraic spaces
which is \'etale-smooth local on the source-and-target and
stable under base change. Then the property of
DM morphisms of algebraic stacks defined in
Definition \ref{definition-etale-smooth-P}
is stable under arbitrary base change.
Namely, let $f : \mathcal{X} \to \mathcal{Y}$
be a DM morphism of algebraic stacks
and $g : \mathcal{Y}' \to \mathcal{Y}$ be a morphism of algebraic stacks
and assume $f$ has property $\mathcal{P}$.
Then the base change
$\mathcal{Y}' \times_\mathcal{Y} \mathcal{X} \to \mathcal{Y}'$
is a DM morphism by Lemma \ref{lemma-base-change-separated}.
Choose an algebraic space $V$
and a surjective smooth morphism $V \to \mathcal{Y}$. Choose an algebraic
space $U$ and a surjective \'etale morphism
$U \to \mathcal{X} \times_\mathcal{Y} V$ (Lemma \ref{lemma-DM}).
Finally, choose an algebraic space
$V'$ and a surjective and smooth morphism
$V' \to \mathcal{Y}' \times_\mathcal{Y} V$. Then the morphism
$U \to V$ has property $\mathcal{P}$ by definition.
Whence $V' \times_V U \to V'$ has property $\mathcal{P}$ as we assumed that
$\mathcal{P}$ is stable under base change. Considering the diagram
$$
\xymatrix{
V' \times_V U \ar[r] \ar[d] &
\mathcal{Y}' \times_\mathcal{Y} \mathcal{X} \ar[r] \ar[d] &
\mathcal{X} \ar[d] \\
V' \ar[r] & \mathcal{Y}' \ar[r] & \mathcal{Y}
}
$$
we see that the left top horizontal arrow is surjective and
$$
V' \times_V U \to V' \times_\mathcal{Y}
(\mathcal{Y}' \times_{\mathcal{Y}'} \mathcal{X}) =
V' \times_V (\mathcal{X} \times_\mathcal{Y} V)
$$
is \'etale as a base change of $U \to \mathcal{X} \times_\mathcal{Y} V$,
whence by definition we see that the projection
$\mathcal{Y}' \times_\mathcal{Y} \mathcal{X} \to \mathcal{Y}'$ has
property $\mathcal{P}$.
\end{remark}

\begin{remark}
\label{remark-etale-smooth-implication}
Let $\mathcal{P}, \mathcal{P}'$ be properties of morphisms of algebraic spaces
which are \'etale-smooth local on the source-and-target.
Suppose that we have $\mathcal{P} \Rightarrow \mathcal{P}'$ for morphisms
of algebraic spaces. Then we also have $\mathcal{P} \Rightarrow \mathcal{P}'$
for the properties of morphisms of algebraic stacks defined in
Definition \ref{definition-etale-smooth-P}
using $\mathcal{P}$ and $\mathcal{P}'$. This is clear from the definition.
\end{remark}








\section{\'Etale morphisms}
\label{section-etale}

\noindent
An \'etale morphism of algebraic stacks should not be defined as a
smooth morphism of relative dimension $0$. Namely, the morphism
$$
[\mathbf{A}^1_k/\mathbf{G}_{m, k}] \longrightarrow \Spec(k)
$$
is smooth of relative dimension $0$ for any choice of action
of the group scheme $\mathbf{G}_{m, k}$ on $\mathbf{A}^1_k$.
This does not correspond to our usual idea that \'etale morphisms
should identify tangent spaces. The example above isn't quasi-finite,
but the morphism
$$
\mathcal{X} = [\Spec(k)/\mu_{p, k}] \longrightarrow \Spec(k)
$$
is smooth and quasi-finite (Section \ref{section-locally-quasi-finite}).
However, if the characteristic of $k$ is $p > 0$, then we see
that the representable morphism $\Spec(k) \to \mathcal{X}$
isn't \'etale as the base change
$\mu_{p, k} = \Spec(k) \times_\mathcal{X} \Spec(k) \to \Spec(k)$
is a morphism from a nonreduced scheme to the spectrum of a field.
Thus if we define an \'etale morphism as smooth and locally quasi-finite,
then the analogue of Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-etale-permanence} would fail.

\medskip\noindent
Instead, our approach will be to start with the requirements that
``\'etaleness'' should be a property preserved under base change and that if
$\mathcal{X} \to X$ is an \'etale morphism from an algebraic stack
to a scheme, then $\mathcal{X}$ should be Deligne-Mumford.
In other words, we will require \'etale morphisms to be DM and
we will use the material in
Section \ref{section-etale-smooth-local-source-target} to define
\'etale morphisms of algebraic stacks.

\medskip\noindent
In Lemma \ref{lemma-characterize-etale} we will characterize
\'etale morphisms of algebraic stacks as morphisms which are
(a) locally of finite presentation,
(b) flat, and (c) have \'etale diagonal.

\medskip\noindent
The property ``\'etale'' of morphisms of algebraic spaces
is \'etale-smooth local on the source-and-target, see
Descent on Spaces, Remark
\ref{spaces-descent-remark-list-etale-smooth-local-source-target}.
It is also stable under base change and fpqc local on the target, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-base-change-etale}
and
Descent on Spaces,
Lemma \ref{spaces-descent-lemma-descending-property-etale}.
Hence, by
Lemma \ref{lemma-etale-smooth-local-source-target}
above, we may define what it means for a morphism of algebraic spaces
to be \'etale as follows and it agrees with the already existing notion
defined in Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}
when the morphism is representable by algebraic spaces
because such a morphism is automatically DM by
Lemma \ref{lemma-trivial-implications}.

\begin{definition}
\label{definition-etale}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $f$ is {\it \'etale} if $f$ is DM and the equivalent conditions of
Lemma \ref{lemma-etale-smooth-local-source-target}
hold with $\mathcal{P} = \etale$.
\end{definition}

\noindent
We will use without further mention that this agrees with the already
existing notion of \'etale morphisms in case $f$ is representable
by algebraic spaces or if $\mathcal{X}$ and $\mathcal{Y}$ are
representable by algebraic spaces.

\begin{lemma}
\label{lemma-composition-etale}
The composition of \'etale morphisms is \'etale.
\end{lemma}

\begin{proof}
Combine Remark \ref{remark-etale-smooth-composition}
with
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-composition-etale}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-etale}
A base change of an \'etale morphism is \'etale.
\end{lemma}

\begin{proof}
Combine
Remark \ref{remark-etale-smooth-base-change}
with
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-etale}.
\end{proof}

\begin{lemma}
\label{lemma-open-immersion-etale}
An open immersion is \'etale.
\end{lemma}

\begin{proof}
Let $j : \mathcal{U} \to \mathcal{X}$ be an open immersion of
algebraic stacks. Since $j$ is representable, it is DM by
Lemma \ref{lemma-trivial-implications}. On the other hand,
if $X \to \mathcal{X}$ is a smooth and surjective morphism
where $X$ is a scheme, then $U = \mathcal{U} \times_\mathcal{X} X$
is an open subscheme of $X$. Hence $U \to X$ is \'etale
(Morphisms, Lemma \ref{morphisms-lemma-open-immersion-etale})
and we conclude that $j$ is \'etale from the definition.
\end{proof}

\begin{lemma}
\label{lemma-etale}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The following are equivalent
\begin{enumerate}
\item $f$ is \'etale,
\item $f$ is DM and for any morphism $V \to \mathcal{Y}$
where $V$ is an algebraic space and any \'etale morphism
$U \to V \times_\mathcal{Y} \mathcal{X}$ where $U$ is an algebraic space,
the morphism $U \to V$ is \'etale,
\item there exists some surjective, locally of finite presentation, and flat
morphism $W \to \mathcal{Y}$ where $W$ is an algebraic space and some
surjective \'etale morphism $T \to W \times_\mathcal{Y} \mathcal{X}$
where $T$ is an algebraic space such that the morphism $T \to W$ is \'etale.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1). Then $f$ is DM and since being \'etale is preserved
by base change, we see that (2) holds.

\medskip\noindent
Assume (2). Choose a scheme $V$ and a surjective \'etale morphism
$V \to \mathcal{Y}$. Choose a scheme $U$ and a surjective \'etale morphism
$U \to V \times_\mathcal{Y} \mathcal{X}$ (Lemma \ref{lemma-DM}).
Thus we see that (3) holds.

\medskip\noindent
Assume $W \to \mathcal{Y}$ and $T \to W \times_\mathcal{Y} \mathcal{X}$
are as in (3). We first check $f$ is DM. Namely, it suffices to check
$W \times_\mathcal{Y} \mathcal{X} \to W$ is DM, see
Lemma \ref{lemma-check-separated-covering}.
By Lemma \ref{lemma-compose-after-separated}
it suffices to check $W \times_\mathcal{Y} \mathcal{X}$ is DM.
This follows from the existence of $T \to W \times_\mathcal{Y} \mathcal{X}$
by (the easy direction of) Theorem \ref{theorem-DM}.

\medskip\noindent
Assume $f$ is DM and $W \to \mathcal{Y}$ and
$T \to W \times_\mathcal{Y} \mathcal{X}$ are as in (3).
Let $V$ be an algebraic space, let $V \to \mathcal{Y}$ be surjective smooth,
let $U$ be an algebraic space, and let
$U \to V \times_\mathcal{Y} \mathcal{X}$ is surjective and \'etale
(Lemma \ref{lemma-DM}). We have to check that $U \to V$ is \'etale.
It suffices to prove $U \times_\mathcal{Y} W \to V \times_\mathcal{Y} W$
is \'etale by Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-etale}.
We may replace $\mathcal{X}, \mathcal{Y}, W, T, U, V$ by
$\mathcal{X} \times_\mathcal{Y} W, W, W, T, U \times_\mathcal{Y} W,
V \times_\mathcal{Y} W$ (small detail omitted).
Thus we may assume that $Y = \mathcal{Y}$ is an algebraic space, there exists
an algebraic space $T$ and a surjective \'etale morphism
$T \to \mathcal{X}$ such that $T \to Y$ is \'etale, and $U$ and $V$
are as before. In this case we know that
$$
U \to V\text{ is \'etale}
\Leftrightarrow
\mathcal{X} \to Y\text{ is \'etale}
\Leftrightarrow
T \to Y\text{ is \'etale}
$$
by the equivalence of properties (1) and (2) of
Lemma \ref{lemma-etale-smooth-local-source-target}
and Definition \ref{definition-etale}.
This finishes the proof.
\end{proof}

\begin{lemma}
\label{lemma-etale-permanence}
Let $\mathcal{X}, \mathcal{Y}$ be algebraic stacks \'etale over
an algebraic stack $\mathcal{Z}$. Any morphism
$\mathcal{X} \to \mathcal{Y}$ over $\mathcal{Z}$ is \'etale.
\end{lemma}

\begin{proof}
The morphism $\mathcal{X} \to \mathcal{Y}$ is DM by
Lemma \ref{lemma-compose-after-separated}.
Let $W \to \mathcal{Z}$ be a surjective smooth morphism
whose source is an algebraic space. Let
$V \to \mathcal{Y} \times_\mathcal{Z} W$ be a surjective
\'etale morphism whose source is an algebraic space
(Lemma \ref{lemma-DM}).
Let $U \to \mathcal{X} \times_\mathcal{Y} V$ be a surjective
\'etale morphism whose source is an algebraic space
(Lemma \ref{lemma-DM}).
Then
$$
U \longrightarrow \mathcal{X} \times_\mathcal{Z} W
$$
is surjective \'etale as the composition of
$U \to \mathcal{X} \times_\mathcal{Y} V$
and the base change of $V \to \mathcal{Y} \times_\mathcal{Z} W$
by $\mathcal{X} \times_\mathcal{Z} W \to \mathcal{Y} \times_\mathcal{Z} W$.
Hence it suffices to show that $U \to W$ is \'etale.
Since $U \to W$ and $V \to W$ are \'etale because
$\mathcal{X} \to \mathcal{Z}$ and $\mathcal{Y} \to \mathcal{Z}$
are \'etale, this follows from the version of the lemma for
algebraic spaces, namely
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-etale-permanence}.
\end{proof}








\section{Unramified morphisms}
\label{section-unramified}

\noindent
For a justification of our choice of definition of
unramified morphisms we refer the reader to the discussion
in the section on \'etale morphisms Section \ref{section-etale}.

\medskip\noindent
In Lemma \ref{lemma-characterize-unramified} we will characterize
unramified morphisms of algebraic stacks as morphisms which are
locally of finite type and have \'etale diagonal.

\medskip\noindent
The property ``unramified'' of morphisms of algebraic spaces
is \'etale-smooth local on the source-and-target, see
Descent on Spaces, Remark
\ref{spaces-descent-remark-list-etale-smooth-local-source-target}.
It is also stable under base change and fpqc local on the target, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-base-change-unramified}
and
Descent on Spaces,
Lemma \ref{spaces-descent-lemma-descending-property-unramified}.
Hence, by
Lemma \ref{lemma-etale-smooth-local-source-target}
above, we may define what it means for a morphism of algebraic spaces
to be unramified as follows and it agrees with the already existing notion
defined in Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}
when the morphism is representable by algebraic spaces
because such a morphism is automatically DM by
Lemma \ref{lemma-trivial-implications}.

\begin{definition}
\label{definition-unramified}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $f$ is {\it unramified} if $f$ is DM and the equivalent conditions of
Lemma \ref{lemma-etale-smooth-local-source-target}
hold with $\mathcal{P} =$``unramified''.
\end{definition}

\noindent
We will use without further mention that this agrees with the already
existing notion of unramified morphisms in case $f$ is representable
by algebraic spaces or if $\mathcal{X}$ and $\mathcal{Y}$ are
representable by algebraic spaces.

\begin{lemma}
\label{lemma-composition-unramified}
The composition of unramified morphisms is unramified.
\end{lemma}

\begin{proof}
Combine Remark \ref{remark-etale-smooth-composition}
with
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-composition-unramified}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-unramified}
A base change of an unramified morphism is unramified.
\end{lemma}

\begin{proof}
Combine
Remark \ref{remark-etale-smooth-base-change}
with
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-unramified}.
\end{proof}

\begin{lemma}
\label{lemma-etale-unramified}
An \'etale morphism is unramified.
\end{lemma}

\begin{proof}
Follows from Remark \ref{remark-etale-smooth-implication}
and Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-etale-unramified}.
\end{proof}

\begin{lemma}
\label{lemma-immersion-unramified}
An immersion is unramified.
\end{lemma}

\begin{proof}
Let $j : \mathcal{Z} \to \mathcal{X}$ be an immersion of
algebraic stacks. Since $j$ is representable, it is DM by
Lemma \ref{lemma-trivial-implications}. On the other hand,
if $X \to \mathcal{X}$ is a smooth and surjective morphism
where $X$ is a scheme, then $Z = \mathcal{Z} \times_\mathcal{X} X$
is a locally closed subscheme of $X$. Hence $Z \to X$ is unramified
(Morphisms, Lemmas \ref{morphisms-lemma-open-immersion-unramified} and
\ref{morphisms-lemma-closed-immersion-unramified})
and we conclude that $j$ is unramified from the definition.
\end{proof}

\begin{lemma}
\label{lemma-unramified}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The following are equivalent
\begin{enumerate}
\item $f$ is unramified,
\item $f$ is DM and for any morphism $V \to \mathcal{Y}$
where $V$ is an algebraic space and any \'etale morphism
$U \to V \times_\mathcal{Y} \mathcal{X}$ where $U$ is an algebraic space,
the morphism $U \to V$ is unramified,
\item there exists some surjective, locally of finite presentation, and flat
morphism $W \to \mathcal{Y}$ where $W$ is an algebraic space and some
surjective \'etale morphism $T \to W \times_\mathcal{Y} \mathcal{X}$
where $T$ is an algebraic space such that the morphism $T \to W$ is unramified.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1). Then $f$ is DM and since being unramified is preserved
by base change, we see that (2) holds.

\medskip\noindent
Assume (2). Choose a scheme $V$ and a surjective \'etale morphism
$V \to \mathcal{Y}$. Choose a scheme $U$ and a surjective \'etale morphism
$U \to V \times_\mathcal{Y} \mathcal{X}$ (Lemma \ref{lemma-DM}).
Thus we see that (3) holds.

\medskip\noindent
Assume $W \to \mathcal{Y}$ and $T \to W \times_\mathcal{Y} \mathcal{X}$
are as in (3). We first check $f$ is DM. Namely, it suffices to check
$W \times_\mathcal{Y} \mathcal{X} \to W$ is DM, see
Lemma \ref{lemma-check-separated-covering}.
By Lemma \ref{lemma-compose-after-separated}
it suffices to check $W \times_\mathcal{Y} \mathcal{X}$ is DM.
This follows from the existence of $T \to W \times_\mathcal{Y} \mathcal{X}$
by (the easy direction of) Theorem \ref{theorem-DM}.

\medskip\noindent
Assume $f$ is DM and $W \to \mathcal{Y}$ and
$T \to W \times_\mathcal{Y} \mathcal{X}$ are as in (3).
Let $V$ be an algebraic space, let $V \to \mathcal{Y}$ be surjective smooth,
let $U$ be an algebraic space, and let
$U \to V \times_\mathcal{Y} \mathcal{X}$ is surjective and \'etale
(Lemma \ref{lemma-DM}). We have to check that $U \to V$ is unramified.
It suffices to prove $U \times_\mathcal{Y} W \to V \times_\mathcal{Y} W$
is unramified by Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-unramified}.
We may replace $\mathcal{X}, \mathcal{Y}, W, T, U, V$ by
$\mathcal{X} \times_\mathcal{Y} W, W, W, T, U \times_\mathcal{Y} W,
V \times_\mathcal{Y} W$ (small detail omitted).
Thus we may assume that $Y = \mathcal{Y}$ is an algebraic space, there exists
an algebraic space $T$ and a surjective \'etale morphism
$T \to \mathcal{X}$ such that $T \to Y$ is unramified, and $U$ and $V$
are as before. In this case we know that
$$
U \to V\text{ is unramified}
\Leftrightarrow
\mathcal{X} \to Y\text{ is unramified}
\Leftrightarrow
T \to Y\text{ is unramified}
$$
by the equivalence of properties (1) and (2) of
Lemma \ref{lemma-etale-smooth-local-source-target}
and Definition \ref{definition-unramified}.
This finishes the proof.
\end{proof}

\begin{lemma}
\label{lemma-permanence-unramified}
Let $\mathcal{X} \to \mathcal{Y} \to \mathcal{Z}$ be
morphisms of algebraic stacks.
If $\mathcal{X} \to \mathcal{Z}$ is unramified and
$\mathcal{Y} \to \mathcal{Z}$ is DM, then
$\mathcal{X} \to \mathcal{Y}$ is unramified.
\end{lemma}

\begin{proof}
Assume $\mathcal{X} \to \mathcal{Z}$ is unramified. By
Lemma \ref{lemma-compose-after-separated} the morphism
$\mathcal{X} \to \mathcal{Y}$ is DM. Choose a commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & V \ar[d] \ar[r] & W \ar[d] \\
\mathcal{X} \ar[r] & \mathcal{Y} \ar[r] & \mathcal{Z}
}
$$
with $U, V, W$ algebraic spaces,
with $W \to \mathcal{Z}$ surjective smooth,
$V \to \mathcal{Y} \times_\mathcal{Z} W$ surjective \'etale, and
$U \to \mathcal{X} \times_\mathcal{Y} V$ surjective \'etale
(see Lemma \ref{lemma-DM}). Then also
$U \to \mathcal{X} \times_\mathcal{Z} W$ is surjective and \'etale.
Hence we know that $U \to W$ is unramified and we have to show that
$U \to V$ is unramified. This follows from
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-permanence-unramified}.
\end{proof}

\begin{lemma}
\label{lemma-characterize-unramified}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The following are equivalent
\begin{enumerate}
\item $f$ is unramified, and
\item $f$ is locally of finite type and its diagonal is \'etale.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume $f$ is unramified. Then $f$ is DM hence we can choose
algebraic spaces $U$, $V$, a smooth surjective morphism
$V \to \mathcal{Y}$ and a surjective \'etale morphism
$U \to \mathcal{X} \times_\mathcal{Y} V$ (Lemma \ref{lemma-DM}).
Since $f$ is unramified the induced morphism $U \to V$ is unramified.
Thus $U \to V$ is locally of finite type
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-unramified-locally-finite-type})
and we conclude that $f$ is locally of finite type. The diagonal
$\Delta : \mathcal{X} \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$
is a morphism of algebraic stacks over $\mathcal{Y}$.
The base change of $\Delta$ by the surjective smooth morphism
$V \to \mathcal{Y}$ is the diagonal of the base change of
$f$, i.e., of $\mathcal{X}_V = \mathcal{X} \times_\mathcal{Y} V \to V$.
In other words, the diagram
$$
\xymatrix{
\mathcal{X}_V \ar[r] \ar[d] &  \mathcal{X}_V \times_V \mathcal{X}_V \ar[d] \\
\mathcal{X} \ar[r] & \mathcal{X} \times_\mathcal{Y} \mathcal{X}
}
$$
is cartesian. Since the right vertical arrow is surjective and smooth
it suffices to show that the top horizontal arrow is \'etale by
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-check-property-weak-covering}.
Consider the commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & U \times_V U \ar[d] \\
\mathcal{X}_V \ar[r] & \mathcal{X}_V \times_V \mathcal{X}_V
}
$$
All arrows are representable by algebraic spaces,
the vertical arrows are \'etale, the left one is surjective, and
the top horizontal arrow is an open immersion by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-diagonal-unramified-morphism}.
This implies what we want: first we see that
$U \to \mathcal{X}_V \times_V \mathcal{X}_V$ is \'etale
as a composition of \'etale morphisms, and then we can use
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-check-property-after-precomposing}
to see that $\mathcal{X}_V \to \mathcal{X}_V \times_V \mathcal{X}_V$
is \'etale because being \'etale (for morphisms of algebraic spaces)
is local on the source in the \'etale topology
(Descent on Spaces, Lemma \ref{spaces-descent-lemma-etale-etale-local-source}).

\medskip\noindent
Assume $f$ is locally of finite type and that its diagonal is \'etale.
Then $f$ is DM by definition (as \'etale morphisms of algebraic spaces
are unramified). As above this means we can choose
algebraic spaces $U$, $V$, a smooth surjective morphism
$V \to \mathcal{Y}$ and a surjective \'etale morphism
$U \to \mathcal{X} \times_\mathcal{Y} V$ (Lemma \ref{lemma-DM}).
To finish the proof we have to show that $U \to V$ is unramified.
We already know that $U \to V$ is locally of finite type.
Arguing as above we find a commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & U \times_V U \ar[d] \\
\mathcal{X}_V \ar[r] & \mathcal{X}_V \times_V \mathcal{X}_V
}
$$
where all arrows are representable by algebraic spaces,
the vertical arrows are \'etale, and the lower horizontal
one is \'etale as a base change of $\Delta$.
It follows that $U \to U \times_V U$ is \'etale
for example by Lemma \ref{lemma-etale-permanence}\footnote{It is
quite easy to deduce this directly from
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-etale-permanence}.}.
Thus $U \to U \times_V U$ is an \'etale monomorphism
hence an open immersion (Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-etale-universally-injective-open}).
Then $U \to V$ is unramified by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-diagonal-unramified-morphism}.
\end{proof}

\begin{lemma}
\label{lemma-characterize-etale}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The following are equivalent
\begin{enumerate}
\item $f$ is \'etale, and
\item $f$ is locally of finite presentation, flat, and unramified,
\item $f$ is locally of finite presentation, flat, and its diagonal
is \'etale.
\end{enumerate}
\end{lemma}

\begin{proof}
The equivalence of (2) and (3) follows immediately from
Lemma \ref{lemma-characterize-unramified}. Thus in each case
the morphism $f$ is DM. Then we can choose Then we can choose
algebraic spaces $U$, $V$, a smooth surjective morphism
$V \to \mathcal{Y}$ and a surjective \'etale morphism
$U \to \mathcal{X} \times_\mathcal{Y} V$ (Lemma \ref{lemma-DM}).
To finish the proof we have to show that
$U \to V$ is \'etale if and only if it is locally of finite
presentation, flat, and unramified.
This follows from Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-unramified-flat-lfp-etale}
(and the more trivial
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-etale-unramified},
\ref{spaces-morphisms-lemma-etale-locally-finite-presentation}, and
\ref{spaces-morphisms-lemma-etale-flat}).
\end{proof}








\section{Proper morphisms}
\label{section-proper}

\noindent
The notion of a proper morphism plays an important role in algebraic geometry.
Here is the definition of a proper morphism of algebraic stacks.

\begin{definition}
\label{definition-proper}
Let $f : \mathcal{X} \to \mathcal{Y}$
be a morphism of algebraic stacks.
We say $f$ is {\it proper} if $f$ is separated, finite type, and
universally closed.
\end{definition}

\noindent
This does not conflict with the already existing notion of a proper morphism
of algebraic spaces: a morphism of algebraic spaces is proper if and only if
it is separated, finite type, and universally closed
(Morphisms of Spaces, Definition \ref{spaces-morphisms-definition-proper})
and we've already checked the compatibility of these notions in
Lemma \ref{lemma-representable-separated-diagonal-closed},
Section \ref{section-finite-type}, and
Lemmas \ref{lemma-characterize-representable-universally-closed}.
Similarly, if $f : \mathcal{X} \to \mathcal{Y}$ is a
morphism of algebraic stacks which is representable by algebraic spaces
then we have defined what it means for $f$ to be proper in
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}.
However, the discussion in that section shows that this is
equivalent to requiring $f$ to be separated, finite type, and
universally closed and the same references as above give the
compatibility.

\begin{lemma}
\label{lemma-base-change-proper}
A base change of a proper morphism is proper.
\end{lemma}

\begin{proof}
See
Lemmas \ref{lemma-base-change-separated},
\ref{lemma-base-change-finite-type}, and
\ref{lemma-base-change-universally-closed}.
\end{proof}

\begin{lemma}
\label{lemma-composition-proper}
A composition of proper morphisms is proper.
\end{lemma}

\begin{proof}
See
Lemmas \ref{lemma-composition-separated},
\ref{lemma-composition-finite-type}, and
\ref{lemma-composition-universally-closed}.
\end{proof}

\begin{lemma}
\label{lemma-closed-immersion-proper}
A closed immersion of algebraic stacks is a proper morphism of
algebraic stacks.
\end{lemma}

\begin{proof}
A closed immersion is by definition representable
(Properties of Stacks, Definition
\ref{stacks-properties-definition-immersion}).
Hence this follows from the discussion in
Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}
and the corresponding result for morphisms of algebraic spaces, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-closed-immersion-proper}.
\end{proof}

\begin{lemma}
\label{lemma-universally-closed-permanence}
Consider a commutative diagram
$$
\xymatrix{
\mathcal{X} \ar[rr] \ar[rd] & &
\mathcal{Y} \ar[ld] \\
& \mathcal{Z} &
}
$$
of algebraic stacks.
\begin{enumerate}
\item If $\mathcal{X} \to \mathcal{Z}$ is universally closed and
$\mathcal{Y} \to \mathcal{Z}$ is separated,
then the morphism $\mathcal{X} \to \mathcal{Y}$ is universally closed.
In particular, the image of $|\mathcal{X}|$ in $|\mathcal{Y}|$ is closed.
\item If $\mathcal{X} \to \mathcal{Z}$ is proper and
$\mathcal{Y} \to \mathcal{Z}$ is separated, then
the morphism $\mathcal{X} \to \mathcal{Y}$ is proper.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume $\mathcal{X} \to \mathcal{Z}$ is universally closed and
$\mathcal{Y} \to \mathcal{Z}$ is separated.
We factor the morphism as
$\mathcal{X} \to \mathcal{X} \times_\mathcal{Z} \mathcal{Y} \to \mathcal{Y}$.
The first morphism is proper (Lemma \ref{lemma-semi-diagonal})
hence universally closed.
The projection $\mathcal{X} \times_\mathcal{Z} \mathcal{Y} \to \mathcal{Y}$
is the base change of a universally closed morphism and hence
universally closed, see
Lemma \ref{lemma-base-change-universally-closed}.
Thus $\mathcal{X} \to \mathcal{Y}$ is universally closed as the composition
of universally closed morphisms, see
Lemma \ref{lemma-composition-universally-closed}.
This proves (1). To deduce (2) combine (1) with
Lemmas \ref{lemma-compose-after-separated},
\ref{lemma-quasi-compact-permanence}, and
\ref{lemma-finite-type-permanence}.
\end{proof}

\begin{lemma}
\label{lemma-image-proper-is-proper}
Let $\mathcal{Z}$ be an algebraic stack.
Let $f : \mathcal{X} \to \mathcal{Y}$
be a morphism of algebraic stacks over $\mathcal{Z}$.
If $\mathcal{X}$ is universally closed over $\mathcal{Z}$
and $f$ is surjective then $\mathcal{Y}$
is universally closed over $\mathcal{Z}$.
In particular, if also $\mathcal{Y}$ is
separated and of finite type over $\mathcal{Z}$,
then $\mathcal{Y}$ is proper over $\mathcal{Z}$.
\end{lemma}

\begin{proof}
Assume $\mathcal{X}$ is universally closed and $f$ surjective.
Denote $p : \mathcal{X} \to \mathcal{Z}$,
$q : \mathcal{Y} \to \mathcal{Z}$ the structure morphisms.
Let $\mathcal{Z}' \to \mathcal{Z}$ be a morphism of algebraic stacks.
The base change $f' : \mathcal{X}' \to \mathcal{Y}'$
of $f$ by $\mathcal{Z}' \to \mathcal{Z}$ is surjective
(Properties of Stacks, Lemma
\ref{stacks-properties-lemma-base-change-surjective}) and the base
change $p' : \mathcal{X}' \to \mathcal{Z}'$ of $p$ is closed.
If $T \subset |\mathcal{Y}'|$ is closed, then
$(f')^{-1}(T) \subset |\mathcal{X}'|$ is closed, hence
$p'((f')^{-1}(T)) = q'(T)$ is closed. So $q'$ is closed.
\end{proof}








\section{Scheme theoretic image}
\label{section-scheme-theoretic-image}

\noindent
Here is the definition.

\begin{definition}
\label{definition-scheme-theoretic-image}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
The {\it scheme theoretic image} of $f$ is the smallest closed substack
$\mathcal{Z} \subset \mathcal{Y}$ through which $f$
factors\footnote{We will see in
Lemma \ref{lemma-scheme-theoretic-image-existence}
that the scheme theoretic image always exists.}.
\end{definition}

\noindent
We often denote $f : \mathcal{X} \to \mathcal{Z}$ the factorization of $f$.
If the morphism $f$ is not quasi-compact, then (in general) the
construction of the scheme theoretic image does not commute with
restriction to open substacks of $\mathcal{Y}$. However, if $f$ is
quasi-compact then the scheme theoretic image commutes with flat base change
(Lemma \ref{lemma-existence-plus-flat-base-change}).

\begin{lemma}
\label{lemma-cover-upstairs}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $g : \mathcal{W} \to \mathcal{X}$ be a morphism of algebraic stacks
which is surjective, flat, and locally of finite presentation.
Then the scheme theoretic image of $f$ exists if and only if the
scheme theoretic image of $f \circ g$ exists and if so then these
scheme theoretic images are the same.
\end{lemma}

\begin{proof}
Assume $\mathcal{Z} \subset \mathcal{Y}$
is a closed substack and $f \circ g$ factors through $\mathcal{Z}$.
To prove the lemma it suffices to show
that $f$ factors through $\mathcal{Z}$.
Consider a scheme $T$ and a morphism $T \to \mathcal{X}$
given by an object $x$ of the fibre category of $\mathcal{X}$ over $T$.
We will show that $x$ is in fact in the fibre category of $\mathcal{Z}$
over $T$. Namely, the projection $T \times_\mathcal{X} \mathcal{W} \to T$
is a surjective, flat, locally finitely presented morphism.
Hence there is an fppf covering $\{T_i \to T\}$ such that
$T_i \to T$ factors through $T \times_\mathcal{X} \mathcal{W} \to T$
for all $i$. Then $T_i \to \mathcal{X}$ factors through $\mathcal{W}$
and hence $T_i \to \mathcal{Y}$ factors through $\mathcal{Z}$.
Thus $x|_{T_i}$ is an object of $\mathcal{Z}$.
Since $\mathcal{Z}$ is a strictly full substack, we conclude
that $x$ is an object of $\mathcal{Z}$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-scheme-theoretic-image-existence}
Let $f : \mathcal{Y} \to \mathcal{X}$ be a morphism of algebraic stacks.
Then the scheme theoretic image of $f$ exists.
\end{lemma}

\begin{proof}
Choose a scheme $V$ and a surjective smooth morphism $V \to \mathcal{Y}$.
By Lemma \ref{lemma-cover-upstairs} we may replace $\mathcal{Y}$ by $V$.
Thus it suffices to show that if $X \to \mathcal{X}$ is a morphism from
a scheme to an algebraic stack, then the scheme theoretic image exists.
Choose a scheme $U$ and a surjective smooth morphism $U \to \mathcal{X}$.
Set $R = U \times_\mathcal{X} U$.
We have $\mathcal{X} = [U/R]$ by
Algebraic Stacks, Lemma \ref{algebraic-lemma-stack-presentation}.
By Properties of Stacks, Lemma
\ref{stacks-properties-lemma-substacks-presentation}
the closed substacks $\mathcal{Z}$ of $\mathcal{X}$
are in $1$-to-$1$ correspondence with $R$-invariant
closed subschemes $Z \subset U$.
Let $Z_1 \subset U$ be the scheme theoretic image of
$X \times_\mathcal{X} U \to U$.
Observe that $X \to \mathcal{X}$ factors through $\mathcal{Z}$
if and only if $X \times_\mathcal{X} U \to U$ factors through
the corresponding $R$-invariant closed subscheme $Z$
(details omitted; hint: this follows because
$X \times_\mathcal{X} U \to X$ is surjective and smooth).
Thus we have to show that there exists a smallest $R$-invariant
closed subscheme $Z \subset U$ containing $Z_1$.

\medskip\noindent
Let $\mathcal{I}_1 \subset \mathcal{O}_U$ be the quasi-coherent
ideal sheaf corresponding to the closed subscheme $Z_1 \subset U$.
Let $Z_\alpha$, $\alpha \in A$ be the set of all $R$-invariant
closed subschemes of $U$ containing $Z_1$.
For $\alpha \in A$, let $\mathcal{I}_\alpha \subset \mathcal{O}_U$
be the quasi-coherent ideal sheaf corresponding to the closed subscheme
$Z_\alpha \subset U$. The containment $Z_1 \subset Z_\alpha$
means $\mathcal{I}_\alpha \subset \mathcal{I}_1$.
The $R$-invariance of $Z_\alpha$ means that
$$
s^{-1}\mathcal{I}_\alpha \cdot \mathcal{O}_R =
t^{-1}\mathcal{I}_\alpha \cdot \mathcal{O}_R
$$
as (quasi-coherent) ideal sheaves on (the algebraic space) $R$.
Consider the image
$$
\mathcal{I} =
\Im\left(
\bigoplus\nolimits_{\alpha \in A} \mathcal{I}_\alpha \to \mathcal{I}_1
\right) =
\Im\left(
\bigoplus\nolimits_{\alpha \in A} \mathcal{I}_\alpha \to \mathcal{O}_X
\right)
$$
Since direct sums of quasi-coherent sheaves are quasi-coherent
and since images of maps between quasi-coherent sheaves are
quasi-coherent, we find that $\mathcal{I}$ is quasi-coherent.
Since pull back is exact and commutes with direct sums we find
$$
s^{-1}\mathcal{I} \cdot \mathcal{O}_R =
t^{-1}\mathcal{I} \cdot \mathcal{O}_R
$$
Hence $\mathcal{I}$ defines an $R$-invariant closed subscheme
$Z \subset U$ which is contained in every $Z_\alpha$ and containes
$Z_1$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-factor-factor}
Let
$$
\xymatrix{
\mathcal{X}_1 \ar[d] \ar[r]_{f_1} & \mathcal{Y}_1 \ar[d] \\
\mathcal{X}_2 \ar[r]^{f_2} & \mathcal{Y}_2
}
$$
be a commutative diagram of algebraic stacks.
Let $\mathcal{Z}_i \subset \mathcal{Y}_i$, $i = 1, 2$ be
the scheme theoretic image of $f_i$. Then the morphism
$\mathcal{Y}_1 \to \mathcal{Y}_2$ induces a morphism
$\mathcal{Z}_1 \to \mathcal{Z}_2$ and a
commutative diagram
$$
\xymatrix{
\mathcal{X}_1 \ar[r] \ar[d] &
\mathcal{Z}_1 \ar[d] \ar[r] &
\mathcal{Y}_1 \ar[d] \\
\mathcal{X}_2 \ar[r] &
\mathcal{Z}_2 \ar[r] &
\mathcal{Y}_2
}
$$
\end{lemma}

\begin{proof}
The scheme theoretic inverse image of $\mathcal{Z}_2$ in $\mathcal{Y}_1$
is a closed substack of $\mathcal{Y}_1$ through
which $f_1$ factors. Hence $\mathcal{Z}_1$ is contained in this.
This proves the lemma.
\end{proof}

\begin{lemma}
\label{lemma-existence-plus-flat-base-change}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a quasi-compact
morphism of algebraic stacks. Then formation of the scheme theoretic image
commutes with flat base change.
\end{lemma}

\begin{proof}
Let $\mathcal{Y}' \to \mathcal{Y}$ be a flat morphism of algebraic stacks.
Choose a scheme $V$ and a surjective smooth morphism $V \to \mathcal{Y}$.
Choose a scheme $V'$ and a
surjective smooth morphism $V' \to \mathcal{Y}' \times_\mathcal{Y} V$.
We may and do assume that $V = \coprod_{i \in I} V_i$ is a disjoint
union of affine schemes and that
$V' = \coprod_{i \in I} \coprod_{j \in J_i} V_{i, j}$
is a disjoint union of affine schemes with each $V_{i, j}$ mapping into $V_i$.
Let
\begin{enumerate}
\item $\mathcal{Z} \subset \mathcal{Y}$ be the scheme theoretic image of $f$,
\item $\mathcal{Z}' \subset \mathcal{Y}'$ be the scheme theoretic image
of the base change of $f$ by $\mathcal{Y}' \to \mathcal{Y}$,
\item $Z \subset V$ be the scheme theoretic image
of the base change of $f$ by $V \to \mathcal{Y}$,
\item $Z' \subset V'$ be the scheme theoretic image
of the base change of $f$ by $V' \to \mathcal{Y}$.
\end{enumerate}
If we can show that
(a) $Z = V \times_\mathcal{Y} \mathcal{Z}$,
(b) $Z' = V' \times_{\mathcal{Y}'} \mathcal{Z}'$, and
(c) $Z' = V' \times_V Z$
then the lemma follows: the inclusion
$\mathcal{Z}' \to \mathcal{Z} \times_\mathcal{Y} \mathcal{Y}'$
(Lemma \ref{lemma-factor-factor})
has to be an isomorphism because after base change by the surjective
smooth morphism $V' \to \mathcal{Y}'$ it is.

\medskip\noindent
Proof of (a). Set $R = V \times_\mathcal{Y} V$.
By Properties of Stacks, Lemma
\ref{stacks-properties-lemma-substacks-presentation}
the rule $\mathcal{Z} \mapsto \mathcal{Z} \times_\mathcal{Y} V$
defines a $1$-to-$1$ correspondence between closed substacks
of $\mathcal{Y}$ and $R$-invariant closed subspaces of $V$.
Moreover, $f : \mathcal{X} \to \mathcal{Y}$ factors through $\mathcal{Z}$
if and only if the base change
$g : \mathcal{X} \times_\mathcal{Y} V \to V$ factors through
$\mathcal{Z} \times_\mathcal{Y} V$.
We claim: the scheme theoretic image $Z \subset V$ of $g$
is $R$-invariant. The claim implies (a) by what we just said.

\medskip\noindent
For each $i$ the morphism $\mathcal{X} \times_\mathcal{Y} V_i \to V_i$
is quasi-compact and hence $\mathcal{X} \times_\mathcal{Y} V_i$ is
quasi-compact. Thus we can choose an affine scheme $W_i$ and a
surjective smooth morphism $W_i \to \mathcal{X} \times_\mathcal{Y} V_i$.
Observe that $W = \coprod W_i$ is a scheme endowed with
a smooth and surjective morphism $W \to \mathcal{X} \times_\mathcal{Y} V$
such that the composition $W \to V$ with $g$ is quasi-compact.
Let $Z \to V$ be the scheme theoretic image of $W \to V$, see
Morphisms, Section
\ref{morphisms-section-scheme-theoretic-image} and
Morphisms of Spaces, Section
\ref{spaces-morphisms-section-scheme-theoretic-image}.
It follows from Lemma \ref{lemma-cover-upstairs}
that $Z \subset V$ is the scheme theoretic image of $g$.
To show that $Z$ is $R$-invariant we claim that both
$$
\text{pr}_0^{-1}(Z), \text{pr}_1^{-1}(Z) \subset R = V \times_\mathcal{Y} V
$$
are the scheme theoretic image of $\mathcal{X} \times_\mathcal{Y} R \to R$.
Namely, we first use Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-flat-base-change-scheme-theoretic-image}
to see that $\text{pr}_0^{-1}(Z)$ is the scheme theoretic image
of the composition
$$
W \times_{V, \text{pr}_0} R = W \times_\mathcal{Y} V \to
\mathcal{X} \times_\mathcal{Y} R \to R
$$
Since the first arrow here is surjective and smooth we see that
$\text{pr}_0^{-1}(Z)$ is the scheme theoretic image of
$\mathcal{X} \times_\mathcal{Y} R \to R$. The same argument applies
that $\text{pr}_1^{-1}(Z)$. Hence $Z$ is $R$-invariant.

\medskip\noindent
Statement (b) is proved in exactly the same way as one proves (a).

\medskip\noindent
Proof of (c). Let $Z_i \subset V_i$ be the scheme theoretic image
of $\mathcal{X} \times_\mathcal{Y} V_i \to V_i$ and let
$Z_{i, j} \subset V_{i, j}$ be the scheme theoretic image of
$\mathcal{X} \times_\mathcal{Y} V_{i, j} \to V_{i, j}$.
Clearly it suffices to show that the inverse image of $Z_i$
in $V_{i, j}$ is $Z_{i, j}$. Above we've seen that
$Z_i$ is the scheme theoretic image of $W_i \to V_i$
and by the same token $Z_{i, j}$ is the scheme theoretic
image of $W_i \times_{V_i} V_{i, j} \to V_{i, j}$.
Hence the equality follows from the case of schemes
(Morphisms, Lemma
\ref{morphisms-lemma-flat-base-change-scheme-theoretic-image})
and the fact that $V_{i, j} \to V_i$ is flat.
\end{proof}

\begin{lemma}
\label{lemma-topology-scheme-theoretic-image}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a quasi-compact
morphism of algebraic stacks. Let $\mathcal{Z} \subset \mathcal{Y}$
be the scheme theoretic image of $f$. Then $|\mathcal{Z}|$
is the closure of the image of $|f|$.
\end{lemma}

\begin{proof}
Let $z \in |\mathcal{Z}|$ be a point.
Choose an affine scheme $V$, a point $v \in V$, and a smooth morphism
$V \to \mathcal{Y}$ mapping $v$ to $z$.
Then $\mathcal{X} \times_\mathcal{Y} V$ is a quasi-compact algebraic stack.
Hence we can find an affine scheme $W$ and a surjective smooth
morphism $W \to \mathcal{X} \times_\mathcal{Y} V$.
By Lemma \ref{lemma-existence-plus-flat-base-change}
the scheme theoretic image of
$\mathcal{X} \times_\mathcal{Y} V \to V$ is
$Z = \mathcal{Z} \times_\mathcal{Y} V$.
Hence the inverse image of $|\mathcal{Z}|$ in $|V|$ is $|Z|$ by
Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian}.
By Lemma \ref{lemma-cover-upstairs} $Z$ is
the scheme theoretic image of $W \to V$.
By Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-compact-scheme-theoretic-image}
we see that the image of $|W| \to |Z|$ is dense.
Hence the image of $|\mathcal{X} \times_\mathcal{Y} V| \to |Z|$
is dense. Observe that $v \in Z$.
Since $|V| \to |\mathcal{Y}|$ is open, a topology argument
tells us that $z$ is in the closure of the image of $|f|$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-scheme-theoretic-image-of-partial-section}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
which is representable by algebraic spaces and separated.
Let $\mathcal{V} \subset \mathcal{Y}$ be an open substack such that
$\mathcal{V} \to \mathcal{Y}$ is quasi-compact.
Let $s : \mathcal{V} \to \mathcal{X}$ be a morphism such that
$f \circ s = \text{id}_\mathcal{V}$.
Let $\mathcal{Y}'$ be the scheme theoretic image of $s$.
Then $\mathcal{Y}' \to \mathcal{Y}$ is an isomorphism over $\mathcal{V}$.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-quasi-compact-permanence}
the morphism $s : \mathcal{V} \to \mathcal{Y}$ is quasi-compact.
Hence the construction of the scheme theoretic image $\mathcal{Y}'$
of $s$ commutes with flat base change by
Lemma \ref{lemma-existence-plus-flat-base-change}.
Thus to prove the lemma
we may assume $\mathcal{Y}$ is representable by an algebraic space
and we reduce to the case of algebraic spaces which is
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-scheme-theoretic-image-of-partial-section}.
\end{proof}









\section{Valuative criteria}
\label{section-valuative}

\noindent
We need to be careful when stating the valuative criterion. Namely, in
the formulation we need to speak about commutative diagrams but we are
working in a $2$-category and we need to make sure the $2$-morphisms
compose correctly as well!

\begin{definition}
\label{definition-fill-in-diagram}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Consider a $2$-commutative solid diagram
\begin{equation}
\label{equation-diagram}
\vcenter{
\xymatrix{
\Spec(K) \ar[r]_-x \ar[d]_j & \mathcal{X} \ar[d]^f \\
\Spec(A) \ar[r]^-y \ar@{..>}[ru] & \mathcal{Y}
}
}
\end{equation}
where $A$ is a valuation ring with field of fractions $K$. Let
$$
\gamma : y \circ j \longrightarrow f \circ x
$$
be a $2$-morphism witnessing the $2$-commutativity of the diagram.
(Notation as in Categories, Sections \ref{categories-section-formal-cat-cat}
and \ref{categories-section-2-categories}.)
Given (\ref{equation-diagram}) and $\gamma$
a {\it dotted arrow} is a triple $(a, \alpha, \beta)$ consisting of a
morphism $a : \Spec(A) \to \mathcal{X}$ and $2$-arrows
$\alpha : a \circ j \to x$, $\beta : y \to f \circ a$
such that
$\gamma = (\text{id}_f \star \alpha) \circ (\beta \star \text{id}_j)$,
in other words such that
$$
\xymatrix{
& f \circ a \circ j \ar[rd]^{\text{id}_f \star \alpha} \\
y \circ j \ar[ru]^{\beta \star \text{id}_j} \ar[rr]^\gamma & &
f \circ x
}
$$
is commutative. A {\it morphism of dotted arrows}
$(a, \alpha, \beta) \to (a', \alpha', \beta')$ is a
$2$-arrow $\theta : a \to a'$ such that
$\alpha = \alpha' \circ (\theta \star \text{id}_j)$ and
$\beta' = (\text{id}_f \star \theta) \circ \beta$.
\end{definition}

\noindent
The preceding definition is a special case of Categories, 
Definition \ref{categories-definition-dotted-arrows}.
The category of dotted arrows depends on $\gamma$ in general.
If $\mathcal{Y}$ is representable by an algebraic space
(or if automorphism groups of objects over fields are trivial), then
of course there is at most one $\gamma$ and one does not need
to check the commutativity of the triangle. More generally, we
have Lemma \ref{lemma-cat-dotted-arrows-independent}.
The commutativity of the triangle is important in the proof
of compatibility with base change, see
proof of Lemma \ref{lemma-cat-dotted-arrows-base-change}.

\begin{lemma}
\label{lemma-cat-dotted-arrows}
In the situation of Definition \ref{definition-fill-in-diagram}
the category of dotted arrows is a groupoid. If $\Delta_f$
is separated, then it is a setoid.
\end{lemma}

\begin{proof}
Since $2$-arrows are invertible it is clear that the category of
dotted arrows is a groupoid. Given a dotted arrow $(a, \alpha, \beta)$
an automorphism of $(a, \alpha, \beta)$ is a $2$-morphism
$\theta : a \to a$ satisfying two conditions. The first condition
$\beta = (\text{id}_f \star \theta) \circ \beta$ signifies that
$\theta$ defines a morphism
$(a, \theta) : \Spec(A) \to \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$.
The second condition
$\alpha = \alpha \circ (\theta \star \text{id}_j)$
implies that the restriction of $(a, \theta)$ to $\Spec(K)$
is the identity. Picture
$$
\xymatrix{
\mathcal{I}_{\mathcal{X}/\mathcal{Y}} \ar[d] & &
\Spec(K) \ar[d]^j \ar[ll]_{(a \circ j, \text{id})} \\
\mathcal{X} & & \Spec(A) \ar[ll]_a \ar[llu]_{(a, \theta)}
}
$$
In other words, if $G \to \Spec(A)$ is the group algebraic space
we get by pulling back the relative inertia by $a$, then
$\theta$ defines a point $\theta \in G(A)$ whose image
in $G(K)$ is trivial. Certainly, if the identity $e : \Spec(A) \to G$
is a closed immersion, then this can happen only if
$\theta$ is the identity.
Looking at Lemma \ref{lemma-diagonal-diagonal}
we obtain the result we want.
\end{proof}

\begin{lemma}
\label{lemma-cat-dotted-arrows-independent}
In Definition \ref{definition-fill-in-diagram}
assume $\mathcal{I}_\mathcal{Y} \to \mathcal{Y}$ is proper
(for example if $\mathcal{Y}$ is separated or if $\mathcal{Y}$
is separated over an algebraic space). Then the category of dotted arrows
is independent (up to noncanonical equivalence) of the choice of $\gamma$
and the existence of a dotted arrow
(for some and hence equivalently all $\gamma$)
is equivalent to the existence of a diagram
$$
\xymatrix{
\Spec(K) \ar[r]_-x \ar[d]_j & \mathcal{X} \ar[d]^f \\
\Spec(A) \ar[r]^-y \ar[ru]_a & \mathcal{Y}
}
$$
with $2$-commutative triangles
(without checking the $2$-morphisms compose correctly).
\end{lemma}

\begin{proof}
Let $\gamma, \gamma' : y \circ j \longrightarrow f \circ x$
be two $2$-morphisms. Then $\gamma^{-1} \circ \gamma'$
is an automorphism of $y$ over $\Spec(K)$.
Hence if $\mathit{Isom}_\mathcal{Y}(y, y) \to \Spec(A)$
is proper, then by the valuative criterion of properness
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-characterize-proper})
we can find $\delta : y \to y$ whose restriction to
$\Spec(K)$ is $\gamma^{-1} \circ \gamma'$.
Then we can use $\delta$ to define an equivalence
between the category of dotted arrows for $\gamma$
to the category of dotted arrows for $\gamma'$ by
sending $(a, \alpha, \beta)$ to $(a, \alpha, \beta \circ \delta)$.
The final statement is clear.
\end{proof}

\begin{lemma}
\label{lemma-cat-dotted-arrows-base-change}
Assume given a $2$-commutative diagram
$$
\xymatrix{
\Spec(K) \ar[r]_-{x'} \ar[d]_j &
\mathcal{X}' \ar[d]^p \ar[r]_q &
\mathcal{X} \ar[d]^f \\
\Spec(A) \ar[r]^-{y'} &
\mathcal{Y}' \ar[r]^g &
\mathcal{Y}
}
$$
with the right square $2$-cartesian. Choose a $2$-arrow
$\gamma' : y' \circ j \to p \circ x'$. Set
$x = q \circ x'$, $y = g \circ y'$ and let
$\gamma : y \circ j \to f \circ x$ be the composition of
$\gamma'$ with the $2$-arrow implicit in the $2$-commutativity
of the right square. Then the category of dotted arrows
for the left square and $\gamma'$ is equivalent to the category of dotted
arrows for the outer rectangle and $\gamma$.
\end{lemma}

\begin{proof}
(We do not know how to prove the analogue of this lemma if instead
of the category of dotted arrows we look at the set of isomorphism
classes of morphisms producing two $2$-commutative
triangles as in Lemma \ref{lemma-cat-dotted-arrows-independent};
in fact this analogue may very well be wrong.)
First proof: this lemma is a special case of Categories, 
Lemma \ref{categories-lemma-cat-dotted-arrows-base-change}.
Second proof: we are allowed to replace
$\mathcal{X}'$ by the $2$-fibre product
$\mathcal{Y}' \times_\mathcal{Y} \mathcal{X}$
as described in Categories, Lemma
\ref{categories-lemma-2-product-categories-over-C}.
Then the object $x'$ becomes the triple $(y' \circ j, x, \gamma)$.
Then we can go from a dotted arrow $(a, \alpha, \beta)$ for the
outer rectangle to a dotted arrow $(a', \alpha', \beta')$
for the left square by taking $a' = (y', a, \beta)$ and
$\alpha' = (\text{id}_{y' \circ j}, \alpha)$ and
$\beta' = \text{id}_{y'}$. Details omitted.
\end{proof}

\begin{lemma}
\label{lemma-cat-dotted-arrows-composition}
Assume given a $2$-commutative diagram
$$
\xymatrix{
\Spec(K) \ar[r]_-x \ar[dd]_j & \mathcal{X} \ar[d]^f \\
& \mathcal{Y} \ar[d]^g \\
\Spec(A) \ar[r]^-z & \mathcal{Z}
}
$$
Choose a $2$-arrow $\gamma : z \circ j \to g \circ f \circ x$.
Let $\mathcal{C}$ be the category of dotted arrows for
the outer rectangle and $\gamma$. Let $\mathcal{C}'$ be the
category of dotted arrows for the square
$$
\xymatrix{
\Spec(K) \ar[r]_-{f \circ x} \ar[d]_j & \mathcal{Y} \ar[d]^g \\
\Spec(A) \ar[r]^-z & \mathcal{Z}
}
$$
and $\gamma$. Then $\mathcal{C}$ is equivalent to a category $\mathcal{C}''$ 
which has the following property: there is 
a functor $\mathcal{C}'' \to \mathcal{C}'$
which turns $\mathcal{C}''$ into a category fibred in groupoids over
$\mathcal{C}'$ and whose fibre categories are categories of dotted arrows
for certain squares of the form
$$
\xymatrix{
\Spec(K) \ar[r]_-x \ar[d]_j & \mathcal{X} \ar[d]^f \\
\Spec(A) \ar[r]^-y & \mathcal{Y}
}
$$
and some choices of $y \circ j \to f \circ x$.
\end{lemma}

\begin{proof}
This lemma is a special case of Categories, 
Lemma \ref{categories-lemma-cat-dotted-arrows-composition}.
\end{proof}

\begin{definition}
\label{definition-uniqueness}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $f$ satisfies the {\it uniqueness part of the valuative criterion}
if for every diagram (\ref{equation-diagram}) and $\gamma$
as in Definition \ref{definition-fill-in-diagram}
the category of dotted arrows is either empty or
a setoid with exactly one isomorphism class.
\end{definition}

\begin{lemma}
\label{lemma-base-change-uniqueness}
The base change of a morphism of algebraic stacks which satisfies the
uniqueness part of the valuative criterion by any morphism of
algebraic stacks is a morphism of algebraic stacks which satisfies the
uniqueness part of the valuative criterion.
\end{lemma}

\begin{proof}
Follows from Lemma \ref{lemma-cat-dotted-arrows-base-change}
and the definition.
\end{proof}

\begin{lemma}
\label{lemma-composition-uniqueness}
The composition of morphisms of algebraic stacks which satisfy the
uniqueness part of the valuative criterion is another
morphism of algebraic stacks which satisfies the
uniqueness part of the valuative criterion.
\end{lemma}

\begin{proof}
Follows from Lemma \ref{lemma-cat-dotted-arrows-composition}
and the definition.
\end{proof}

\begin{lemma}
\label{lemma-uniqueness-representable}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
which is representable by algebraic spaces. Then the following are equivalent
\begin{enumerate}
\item $f$ satisfies the uniqueness part of the valuative criterion,
\item for every scheme $T$ and morphism $T \to \mathcal{Y}$
the morphism $\mathcal{X} \times_\mathcal{Y} T \to T$ satisfies
the uniqueness part of the valuative criterion as a morphism
of algebraic spaces.
\end{enumerate}
\end{lemma}

\begin{proof}
Follows from Lemma \ref{lemma-cat-dotted-arrows-base-change}
and the definition.
\end{proof}

\begin{definition}
\label{definition-existence}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $f$ satisfies the {\it existence part of the valuative criterion}
if for every diagram (\ref{equation-diagram}) and $\gamma$
as in Definition \ref{definition-fill-in-diagram}
there exists an extension $K'/K$ of fields, a valuation ring $A' \subset K'$
dominating $A$ such that the category of dotted arrows for the
outer rectangle of the diagram
$$
\xymatrix{
\Spec(K') \ar[r] \ar@/^2em/[rr]_{x'} \ar[d]_{j'} &
\Spec(K) \ar[d]_j \ar[r]_-x &
\mathcal{X} \ar[d]^f \\
\Spec(A') \ar[r] \ar@/_2em/[rr]^{y'} &
\Spec(A) \ar[r]^-y &
\mathcal{Y}
}
$$
with induced $2$-arrow $\gamma' : y' \circ j' \to f \circ x'$ is nonempty.
\end{definition}

\noindent
We have already seen in the case of morphisms of algebraic spaces,
that it is necessary to allow extensions of the fractions fields
in order to get the correct notion of the valuative criterion.
See Morphisms of Spaces, Example
\ref{spaces-morphisms-example-finite-separable-needed}.
Still, for morphisms between separated algebraic spaces, such
an extension is not needed
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-usual-enough}).
However, for morphisms between algebraic stacks, an extension may
be needed even if $\mathcal{X}$ and $\mathcal{Y}$ are both separated.
For example consider the morphism of algebraic stacks
$$
[\Spec(\mathbf{C})/G] \to \Spec(\mathbf{C})
$$
over the base scheme $\Spec(\mathbf{C})$
where $G$ is a group of order $2$. Both source and target are separated
algebraic stacks and the morphism is proper. Whence it
satisfies the uniqueness and existence parts of the valuative criterion
(see Lemma \ref{lemma-criterion-proper}).
But on the other hand, there is a diagram
$$
\xymatrix{
\Spec(K) \ar[r] \ar[d] & [\Spec(\mathbf{C})/G] \ar[d] \\
\Spec(A) \ar[r] & \Spec(\mathbf{C})
}
$$
where no dotted arrow exists with $A = \mathbf{C}[[t]]$ and
$K = \mathbf{C}((t))$. Namely, the top horizontal arrow is given
by a $G$-torsor over the spectrum of $K = \mathbf{C}((t))$. Since any $G$-torsor
over the strictly henselian local ring $A = \mathbf{C}[[t]]$ is trivial, we see
that if a dotted arrow always exists, then every $G$-torsor over
$K$ is trivial. This is not true because $G = \{+1, -1\}$
and by Kummer theory $G$-torsors over $K$ are classified by
$K^*/(K^*)^2$ which is nontrivial.

\begin{lemma}
\label{lemma-base-change-existence}
The base change of a morphism of algebraic stacks which satisfies the
existence part of the valuative criterion by any morphism of
algebraic stacks is a morphism of algebraic stacks which satisfies the
existence part of the valuative criterion.
\end{lemma}

\begin{proof}
Follows from Lemma \ref{lemma-cat-dotted-arrows-base-change}
and the definition.
\end{proof}

\begin{lemma}
\label{lemma-composition-existence}
The composition of morphisms of algebraic stacks which satisfy the
existence part of the valuative criterion is another
morphism of algebraic stacks which satisfies the
existence part of the valuative criterion.
\end{lemma}

\begin{proof}
Follows from Lemma \ref{lemma-cat-dotted-arrows-composition}
and the definition.
\end{proof}

\begin{lemma}
\label{lemma-existence-representable}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks
which is representable by algebraic spaces. Then the following are equivalent
\begin{enumerate}
\item $f$ satisfies the existence part of the valuative criterion,
\item for every scheme $T$ and morphism $T \to \mathcal{Y}$
the morphism $\mathcal{X} \times_\mathcal{Y} T \to T$ satisfies
the existence part of the valuative criterion as a morphism
of algebraic spaces.
\end{enumerate}
\end{lemma}

\begin{proof}
Follows from Lemma \ref{lemma-cat-dotted-arrows-base-change}
and the definition.
\end{proof}

\begin{lemma}
\label{lemma-closed-immersion-valuative-criteria}
A closed immersion of algebraic stacks satisfies both
the existence and uniqueness part of the valuative criterion.
\end{lemma}

\begin{proof}
Omitted. Hint: reduce to the case of a closed immersion of
schemes by Lemmas \ref{lemma-uniqueness-representable} and
\ref{lemma-existence-representable}.
\end{proof}





\section{Valuative criterion for second diagonal}
\label{section-valuative-second}

\noindent
The converse statement has already been proved in
Lemma \ref{lemma-cat-dotted-arrows}.
The criterion itself is the following.

\begin{lemma}
\label{lemma-setoids-and-diagonal}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
If $\Delta_f$ is quasi-separated and if for every diagram
(\ref{equation-diagram}) and choice of $\gamma$ as in
Definition \ref{definition-fill-in-diagram}
the category of dotted arrows
is a setoid, then $\Delta_f$ is separated.
\end{lemma}

\begin{proof}
We are going to write out a detailed proof, but we strongly urge the
reader to find their own proof, inspired by reading the argument
given in the proof of Lemma \ref{lemma-cat-dotted-arrows}.

\medskip\noindent
Assume $\Delta_f$ is quasi-separated and for every diagram
(\ref{equation-diagram}) and choice of $\gamma$ as in
Definition \ref{definition-fill-in-diagram}
the category of dotted arrows is a setoid.
By Lemma \ref{lemma-diagonal-diagonal} it suffices to show that
$e : \mathcal{X} \to \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
is a closed immersion. By
Lemma \ref{lemma-first-diagonal-separated-second-diagonal-closed}
it in fact suffices to show that $e = \Delta_{f, 2}$ is
universally closed.
Either of these lemmas tells us that $e = \Delta_{f, 2}$ is quasi-compact
by our assumption that $\Delta_f$ is quasi-separated.

\medskip\noindent
In this paragraph we will show that $e$ satisfies the existence
part of the valuative criterion. Consider a $2$-commutative solid diagram
$$
\xymatrix{
\Spec(K) \ar[r]_x \ar[d]_j & \mathcal{X} \ar[d]^e \\
\Spec(A) \ar[r]^{(a, \theta)} & \mathcal{I}_{\mathcal{X}/\mathcal{Y}}
}
$$
and let $\alpha : (a, \theta) \circ j \to e \circ x$ be any $2$-morphism
witnessing the $2$-commutativity of the diagram (we use $\alpha$ instead
of the letter $\gamma$ used in Definition \ref{definition-fill-in-diagram}).
Note that $f \circ \theta = \text{id}$; we will use this below.
Observe that $e \circ x = (x, \text{id}_x)$ and
$(a, \theta) \circ j = (a \circ j, \theta \star \text{id}_j)$.
Thus we see that $\alpha$ is a $2$-arrow $\alpha : a \circ j \to x$
compatible with $\theta \star \text{id}_j$ and $\text{id}_x$.
Set $y = f \circ x$ and $\beta = \text{id}_{f \circ a}$.
Reading the arguments given in the proof of
Lemma \ref{lemma-cat-dotted-arrows}
backwards, we see that $\theta$ is an automorphism of the
dotted arrow $(a, \alpha, \beta)$ with
$$
\gamma : y \circ j \to f \circ x
\quad\text{equal to}\quad
\text{id}_f \star \alpha : f \circ a \circ j \to f \circ x
$$
On the other hand, $\text{id}_a$ is an automorphism too, hence
we conclude $\theta = \text{id}_a$ from the assumption on $f$.
Then we can take as dotted arrow for the displayed diagram above
the morphism $a : \Spec(A) \to \mathcal{X}$ with $2$-morphisms
$(a, \text{id}_a) \circ j \to (x, \text{id}_x)$ given by $\alpha$
and $(a, \theta) \to e \circ a$ given by $\text{id}_a$.

\medskip\noindent
By Lemma \ref{lemma-base-change-existence} any base change of $e$
satisfies the existence part of the valuative criterion.
Since $e$ is representable by algebraic spaces, it suffices to
show that $e$ is universally closed after a base change
by a morphism $I \to \mathcal{I}_{\mathcal{X}/\mathcal{Y}}$
which is surjective and smooth and with $I$ an algebraic space
(see Properties of Stacks, Section
\ref{stacks-properties-section-properties-morphisms}).
This base change $e' : X' \to I'$ is a quasi-compact
morphism of algebraic spaces which
satisfies the existence part of the valuative criterion
and hence is universally closed by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-compact-existence-universally-closed}.
\end{proof}






\section{Valuative criterion for the diagonal}
\label{section-valuative-diagonal}

\noindent
The result is Lemma \ref{lemma-uniqueness-and-diagonal}.
We first state and prove a formal helper lemma.

\begin{lemma}
\label{lemma-helper-diagonal}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Consider a $2$-commutative solid diagram
$$
\xymatrix{
\Spec(K) \ar[rr]_-x \ar[d]_j & &
\mathcal{X} \ar[d]^{\Delta_f} \\
\Spec(A) \ar[rr]^{(a_1, a_2, \varphi)} \ar@{..>}[rru] & &
\mathcal{X} \times_\mathcal{Y} \mathcal{X}
}
$$
where $A$ is a valuation ring with field of fractions $K$. Let
$\gamma : (a_1, a_2, \varphi) \circ j \longrightarrow \Delta_f \circ x$
be a $2$-morphism witnessing the $2$-commutativity of the diagram.
Then
\begin{enumerate}
\item Writing $\gamma = (\alpha_1, \alpha_2)$ with
$\alpha_i : a_i \circ j \to x$ we obtain two dotted arrows
$(a_1, \alpha_1, \text{id})$ and $(a_2, \alpha_2, \varphi)$ in
the diagram
$$
\xymatrix{
\Spec(K) \ar[r]_-x \ar[d]_j & \mathcal{X} \ar[d]^f \\
\Spec(A) \ar[r]^-{f \circ a_1} \ar@{..>}[ru] & \mathcal{Y}
}
$$
\item The category of dotted arrows for the original diagram
and $\gamma$ is a setoid whose set of isomorphism
classes of objects equal to the set of morphisms
$(a_1, \alpha_1, \text{id}) \to (a_2, \alpha_2, \varphi)$ in
the category of dotted arrows.
\end{enumerate}
\end{lemma}

\begin{proof}
Since $\Delta_f$ is representable by algebraic spaces (hence the diagonal
of $\Delta_f$ is separated), we see that the category of dotted arrows
in the first commutative diagram of the lemma is a setoid by
Lemma \ref{lemma-cat-dotted-arrows}. All the other statements
of the lemma are consequences of $2$-diagramatic
computations which we omit.
\end{proof}

\begin{lemma}
\label{lemma-uniqueness-and-diagonal}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Assume $f$ is quasi-separated.
If $f$ satisfies the uniqueness part of the valuative criterion,
then $f$ is separated.
\end{lemma}

\begin{proof}
The assumption on $f$ means that $\Delta_f$ is quasi-compact
and quasi-separated (Definition \ref{definition-separated}).
We have to show that $\Delta_f$ is proper.
Lemma \ref{lemma-setoids-and-diagonal} says that $\Delta_f$
is separated. By Lemma \ref{lemma-properties-diagonal}
we know that $\Delta_f$ is locally of finite type.
To finish the proof we have to show that
$\Delta_f$ is universally closed. A formal argument
(see Lemma \ref{lemma-helper-diagonal}) shows that
the uniqueness part of the valuative criterion implies
that we have the existence of a dotted arrow in any solid diagram like so:
$$
\xymatrix{
\Spec(K) \ar[d] \ar[r] & \mathcal{X} \ar[d]^{\Delta_f} \\
\Spec(A) \ar[r] \ar@{..>}[ru] & \mathcal{X} \times_\mathcal{Y} \mathcal{X}
}
$$
Using that this property is preserved by any base change
we conclude that any base change by $\Delta_f$ by an algebraic
space mapping into $\mathcal{X} \times_\mathcal{Y} \mathcal{X}$
has the existence part of the valuative criterion and
we conclude is universally closed by the valuative criterion
for morphisms of algebraic spaces, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-compact-existence-universally-closed}.
\end{proof}

\noindent
Here is a converse.

\begin{lemma}
\label{lemma-converse-uniqueness-and-diagonal}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
If $f$ is separated, then $f$ satisfies the
uniqueness part of the valuative criterion.
\end{lemma}

\begin{proof}
Since $f$ is separated we see that all categories of dotted arrows
are setoids by Lemma \ref{lemma-cat-dotted-arrows}.
Consider a diagram
$$
\xymatrix{
\Spec(K) \ar[r]_-x \ar[d]_j & \mathcal{X} \ar[d]^f \\
\Spec(A) \ar[r]^-y \ar@{..>}[ru] & \mathcal{Y}
}
$$
and a $2$-morphism $\gamma : y \circ j \to f \circ x$ as in
Definition \ref{definition-fill-in-diagram}. Consider two
objects $(a, \alpha, \beta)$ and $(a', \beta', \alpha')$
of the category of dotted arrows. To finish the proof we
have to show these objects are isomorphic. The isomorphism
$$
f \circ a \xrightarrow{\beta^{-1}} y \xrightarrow{\beta'} f \circ a'
$$
means that $(a, a', \beta' \circ \beta^{-1})$ is a morphism
$\Spec(A) \to \mathcal{X} \times_\mathcal{Y} \mathcal{X}$.
On the other hand, $\alpha$ and $\alpha'$ define
a $2$-arrow
$$
(a, a', \beta' \circ \beta^{-1}) \circ j =
(a \circ j, a' \circ j,
(\beta' \star \text{id}_j) \circ (\beta \star \text{id}_j)^{-1})
\xrightarrow{(\alpha, \alpha')} (x, x, \text{id}) = \Delta_f \circ x
$$
Here we use that both $(a, \alpha, \beta)$ and $(a', \alpha', \beta')$
are dotted arrows with respect to $\gamma$.
We obtain a commutative diagram
$$
\xymatrix{
\Spec(K) \ar[d]_j \ar[rr]_x & & \mathcal{X} \ar[d]^{\Delta_f} \\
\Spec(A) \ar[rr]^{(a, a', \beta' \circ \beta^{-1})} & &
\mathcal{X} \times_\mathcal{Y} \mathcal{X}
}
$$
with $2$-commutativity witnessed by $(\alpha, \alpha')$. Now
$\Delta_f$ is representable by algebraic spaces
(Lemma \ref{lemma-properties-diagonal})
and proper as $f$ is separated. Hence by
Lemma \ref{lemma-existence-representable}
and the valuative criterion for properness for algebraic spaces
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-characterize-proper})
we see that there exists a dotted arrow.
Unwinding the construction, we see that this means
$(a, \alpha, \beta)$ and $(a', \alpha', \beta')$
are isomorphic in the category of dotted arrows as desired.
\end{proof}






\section{Valuative criterion for universal closedness}
\label{section-valutive-criterion}

\noindent
Here is a statement.

\begin{lemma}
\label{lemma-quasi-compact-existence-universally-closed}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Assume
\begin{enumerate}
\item $f$ is quasi-compact, and
\item $f$ satisfies the existence part of the valuative criterion.
\end{enumerate}
Then $f$ is universally closed.
\end{lemma}

\begin{proof}
By Lemmas \ref{lemma-base-change-quasi-compact}
and \ref{lemma-base-change-existence}
properties (1) and (2) are preserved under
any base change. By Lemma \ref{lemma-universally-closed-local}
we only have to show that $|T \times_\mathcal{Y} \mathcal{X}| \to |T|$
is closed, whenever $T$ is an affine scheme mapping into $\mathcal{Y}$.
Hence it suffices to show: if $f : \mathcal{X} \to Y$ is a
quasi-compact morphism from an algebraic stack to an affine scheme
satisfying the existence part of the valuative criterion,
then $|f|$ is closed. Let $T \subset |\mathcal{X}|$ be a closed subset.
We have to show that $f(T)$ is closed to finish the proof.

\medskip\noindent
Let $\mathcal{Z} \subset \mathcal{X}$ be the reduced induced
algebraic stack structure on $T$ (Properties of Stacks,
Definition \ref{stacks-properties-definition-reduced-induced-stack}).
Then $i : \mathcal{Z} \to \mathcal{X}$ is a closed immersion
and we have to show that the image of $|\mathcal{Z}| \to |Y|$
is closed. Since closed immersions are quasi-compact
(Lemma \ref{lemma-closed-immersion-quasi-compact})
and satisfies the existence part of the valuative criterion
(Lemma \ref{lemma-closed-immersion-valuative-criteria})
and since compositions of quasi-compact morphisms are quasi-compact
(Lemma \ref{lemma-composition-quasi-compact})
and since compositions preserve the property of satisfying
the existence part of the valuative criterion
(Lemma \ref{lemma-composition-existence})
we conclude that it suffices to show: if $f : \mathcal{X} \to Y$
is a quasi-compact morphism from an algebraic stack to an affine scheme
satisfying the existence part of the valuative criterion,
then $|f|(|\mathcal{X}|)$ is closed.

\medskip\noindent
Since $\mathcal{X}$ is quasi-compact (being quasi-compact over the
affine $Y$), we can choose an affine scheme $U$ and a surjective
smooth morphism $U \to \mathcal{X}$
(Properties of Stacks, Lemma
\ref{stacks-properties-lemma-quasi-compact-stack}).
Suppose that $y \in Y$ is in the closure of the image of $U \to Y$
(in other words, in the closure of the image of $|f|$).
Then by
Morphisms, Lemma \ref{morphisms-lemma-reach-points-scheme-theoretic-image}
we can find a valuation ring $A$ with fraction field $K$
and a commutative diagram
$$
\xymatrix{
\Spec(K) \ar[r] \ar[d] & U \ar[d] \\
\Spec(A) \ar[r] & Y
}
$$
such that the closed point of $\Spec(A)$ maps to $y$. By assumption
we get an extension $K'/K$ and a valuation ring $A' \subset K'$
dominating $A$ and the dotted arrow in the following diagram
$$
\xymatrix{
\Spec(K') \ar[r] \ar[d] &
\Spec(K) \ar[r] \ar[d] &
U \ar[d] \ar[r] &
\mathcal{X} \ar[d]^f \\
\Spec(A') \ar[r] \ar@{..>}[rrru] &
\Spec(A) \ar[r] &
Y  \ar@{=}[r] &
Y
}
$$
Thus $y$ is in the image of $|f|$ and we win.
\end{proof}

\noindent
Here is a converse.

\begin{lemma}
\label{lemma-converse-existence-universally-closed}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Assume
\begin{enumerate}
\item $f$ is quasi-separated, and
\item $f$ is universally closed.
\end{enumerate}
Then $f$ satisfies the existence part of the valuative criterion.
\end{lemma}

\begin{proof}
Consider a solid diagram
$$
\xymatrix{
\Spec(K) \ar[r]_-x \ar[d]_j & \mathcal{X} \ar[d]^f \\
\Spec(A) \ar[r]^-y \ar@{..>}[ru] & \mathcal{Y}
}
$$
where $A$ is a valuation ring with field of fractions $K$
and $\gamma : y \circ j \longrightarrow f \circ x$ as in
Definition \ref{definition-fill-in-diagram}. By
Lemma \ref{lemma-cat-dotted-arrows-base-change}
in order to find a dotted arrow (after possibly replacing
$K$ by an extension and $A$ by a valuation ring dominating it)
we may replace $\mathcal{Y}$ by $\Spec(A)$ and $\mathcal{X}$
by $\Spec(A) \times_\mathcal{Y} \mathcal{X}$. Of course
we use here that being
quasi-separated and universally closed are preserved under base change.
Thus we reduce to the case discussed in the next paragraph.

\medskip\noindent
Consider a solid diagram
$$
\xymatrix{
\Spec(K) \ar[r]_-x \ar[d]_j & \mathcal{X} \ar[d]^f \\
\Spec(A) \ar@{=}[r] \ar@{..>}[ru] & \Spec(A)
}
$$
where $A$ is a valuation ring with field of fractions $K$ as in
Definition \ref{definition-fill-in-diagram}.
By Lemma \ref{lemma-quasi-compact-permanence} and the fact
that $f$ is quasi-separated we have that
the morphism $x$ is quasi-compact.
Since $f$ is universally closed, we have in particular
that $|f|(\overline{\{x\}})$ is closed in $\Spec(A)$.
Since this image contains the generic point of $\Spec(A)$
there exists a point $x' \in |\mathcal{X}|$ in the closure
of $x$ mapping to the closed point of $\Spec(A)$.
By Lemma \ref{lemma-reach-points-scheme-theoretic-image}
we can find a commutative diagram
$$
\xymatrix{
\Spec(K') \ar[r] \ar[d] & \Spec(K) \ar[d] \\
\Spec(A') \ar[r] & \mathcal{X}
}
$$
such that the closed point of $\Spec(A')$ maps to $x' \in |\mathcal{X}|$.
It follows that $\Spec(A') \to \Spec(A)$ maps the closed point
to the closed point, i.e., $A'$ dominates $A$ and this finishes the proof.
\end{proof}





\section{Valuative criterion for properness}
\label{section-valutive-criterion-properness}

\noindent
Here is the statement.

\begin{lemma}
\label{lemma-criterion-proper}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Assume $f$ is of finite type and quasi-separated.
Then the following are equivalent
\begin{enumerate}
\item $f$ is proper, and
\item $f$ satisfies both the uniqueness and existence parts
of the valuative criterion.
\end{enumerate}
\end{lemma}

\begin{proof}
A proper morphism is the same thing as a separated, finite type, and
universally closed morphism. Thus this lemma follows from Lemmas
\ref{lemma-uniqueness-and-diagonal},
\ref{lemma-converse-uniqueness-and-diagonal},
\ref{lemma-quasi-compact-existence-universally-closed}, and
\ref{lemma-converse-existence-universally-closed}.
\end{proof}







\section{Local complete intersection morphisms}
\label{section-lci}

\noindent
The property ``being a local complete intersection morphism''
of morphisms of algebraic spaces is
smooth local on the source-and-target, see
Descent on Spaces, Lemma \ref{spaces-descent-lemma-smooth-local-source-target}
and
More on Morphisms of Spaces, Lemmas
\ref{spaces-more-morphisms-lemma-descending-property-lci} and
\ref{spaces-more-morphisms-lemma-lci-syntomic-local-source}.
By Lemma \ref{lemma-local-source-target} above, we may define what it
means for a morphism of algebraic spaces to be
a local complete intersection morphism as follows and it agrees with the
already existing notion defined in
More on Morphisms of Spaces,
Section \ref{spaces-more-morphisms-section-lci}
when both source and target are algebraic spaces.

\begin{definition}
\label{definition-lci}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
We say $f$ is a {\it local complete intersection morphism} or {\it Koszul}
if the equivalent conditions of
Lemma \ref{lemma-local-source-target}
hold with $\mathcal{P} = \text{local complete intersection}$.
\end{definition}

\begin{lemma}
\label{lemma-composition-lci}
The composition of local complete intersection morphisms is
a local complete intersection.
\end{lemma}

\begin{proof}
Combine
Remark \ref{remark-composition}
with
More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-composition-lci}.
\end{proof}

\begin{lemma}
\label{lemma-flat-base-change-lci}
A flat base change of a local complete intersection morphism is
a local complete intersection morphism.
\end{lemma}

\begin{proof}
Omitted. Hint: Argue exactly as in Remark \ref{remark-base-change}
(but only for flat $\mathcal{Y}' \to \mathcal{Y}$) using
More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-flat-base-change-lci}.
\end{proof}

\begin{lemma}
\label{lemma-lci-permanence}
Let
$$
\xymatrix{
\mathcal{X} \ar[rr]_f \ar[rd] & & \mathcal{Y} \ar[ld] \\
& \mathcal{Z}
}
$$
be a commutative diagram of morphisms of algebraic stacks.
Assume $\mathcal{Y} \to \mathcal{Z}$ is smooth and
$\mathcal{X} \to \mathcal{Z}$ is a local complete intersection morphism.
Then $f : \mathcal{X} \to \mathcal{Y}$ is a
local complete intersection morphism.
\end{lemma}

\begin{proof}
Choose a scheme $W$ and a surjective smooth morphism $W \to \mathcal{Z}$.
Choose a scheme $V$ and a surjective smooth morphism
$V \to W \times_\mathcal{Z} \mathcal{Y}$.
Choose a scheme $U$ and a surjective smooth morphism
$U \to V \times_\mathcal{Y} \mathcal{X}$.
Then $U \to W$ is a local complete intersection morphism of schemes and
$V \to W$ is a smooth morphism of schemes. By the result for schemes
(More on Morphisms, Lemma \ref{more-morphisms-lemma-lci-permanence})
we conclude that $U \to V$ is a local complete intersection morphism.
By definition this means that $f$ is a local complete intersection morphism.
\end{proof}





\section{Stabilizer preserving morphisms}
\label{section-stabilizer-preserving}

\noindent
In the literature a morphism $f : \mathcal{X} \to \mathcal{Y}$ of algebraic
stacks is said to be {\it stabilizer preserving} or
{\it fixed-point reflecting} if the induced morphism
$\mathcal{I}_\mathcal{X} \to
\mathcal{X} \times_\mathcal{Y} \mathcal{I}_\mathcal{Y}$
is an isomorphism. Such a morphism induces an isomorphism
between automorphism groups (Remark \ref{remark-identify-automorphism-groups})
in every point of $\mathcal{X}$.
In this section we prove some simple lemmas around this concept.

\begin{lemma}
\label{lemma-stabilizer-preserving}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
If $\mathcal{I}_\mathcal{X} \to
\mathcal{X} \times_\mathcal{Y} \mathcal{I}_\mathcal{Y}$ is an isomorphism,
then $f$ is representable by algebraic spaces.
\end{lemma}

\begin{proof}
Immediate from Lemma \ref{lemma-second-diagonal}.
\end{proof}

\begin{remark}
\label{remark-get-property-auts-from-diagonal}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Let $U \to \mathcal{X}$ be a morphism whose source is an algebraic space.
Let $G \to H$ be the pullback of the morphism
$\mathcal{I}_\mathcal{X} \to
\mathcal{X} \times_\mathcal{Y} \mathcal{I}_\mathcal{Y}$
to $U$. If $\Delta_f$ is unramified, \'etale, etc, so
is $G \to H$. This is true because
$$
\xymatrix{
U \times_\mathcal{X} U \ar[r] \ar[d] & \mathcal{X} \ar[d]^{\Delta_f} \\
U \times_\mathcal{Y} U \ar[r] & \mathcal{X} \times_\mathcal{Y} \mathcal{X}
}
$$
is cartesian and the morphism $G \to H$ is the base change of the
left vertical arrow by the diagonal $U \to U \times U$.
Compare with the proof of Lemma \ref{lemma-separated-implies-isom}.
\end{remark}

\begin{lemma}
\label{lemma-aut-iso-unramified}
Let $f : \mathcal{X} \to \mathcal{Y}$ be an unramified
morphism of algebraic stacks. The following are equivalent
\begin{enumerate}
\item $\mathcal{I}_\mathcal{X} \to
\mathcal{X} \times_\mathcal{Y} \mathcal{I}_\mathcal{Y}$
is an isomorphism, and
\item $f$ induces an isomorphism between automorphism groups at $x$ and $f(x)$
(Remark \ref{remark-identify-automorphism-groups}) for all
$x \in |\mathcal{X}|$.
\end{enumerate}
\end{lemma}

\begin{proof}
Choose a scheme $U$ and a surjective smooth morphism $U \to \mathcal{X}$.
Denote $G \to H$ the pullback of the morphism
$\mathcal{I}_\mathcal{X} \to
\mathcal{X} \times_\mathcal{Y} \mathcal{I}_\mathcal{Y}$
to $U$. By Remark \ref{remark-get-property-auts-from-diagonal} and
Lemma \ref{lemma-characterize-unramified} the morphism $G \to H$ is \'etale.
Condition (1) is equivalent to the condition that
$G \to H$ is an isomorphism (this follows for example by applying
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-check-property-covering}).
Condition (2) is equivalent to the condition that
for every $u \in U$ the morphism $G_u \to H_u$ of fibres
is an isomorphism. Thus (1) $\Rightarrow$ (2) is trivial.
If (2) holds, then $G \to H$ is a surjective, universally injective,
\'etale morphism of algebraic spaces. Such a morphism is an isomorphism by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-etale-universally-injective-open}.
\end{proof}

\begin{lemma}
\label{lemma-stabilizer-preserving-unramified}
\begin{reference}
\cite[Proposition 3.5]{rydh_quotients} and
\cite[Proposition 2.5]{alper_quotient}
\end{reference}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Assume
\begin{enumerate}
\item $f$ is representable by algebraic spaces and unramified, and
\item $\mathcal{I}_\mathcal{Y} \to \mathcal{Y}$ is proper.
\end{enumerate}
Then the set of $x \in |\mathcal{X}|$ such that $f$ induces an
isomorphism between automorphism groups at $x$ and $f(x)$
(Remark \ref{remark-identify-automorphism-groups}) is open.
Letting $\mathcal{U} \subset \mathcal{X}$ be the corresponding open substack,
the morphism
$\mathcal{I}_\mathcal{U} \to
\mathcal{U} \times_\mathcal{Y} \mathcal{I}_\mathcal{Y}$
is an isomorphism.
\end{lemma}

\begin{proof}
Choose a scheme $U$ and a surjective smooth morphism $U \to \mathcal{X}$.
Denote $G \to H$ the pullback of the morphism
$\mathcal{I}_\mathcal{X} \to
\mathcal{X} \times_\mathcal{Y} \mathcal{I}_\mathcal{Y}$
to $U$. By Remark \ref{remark-get-property-auts-from-diagonal} and
Lemma \ref{lemma-characterize-unramified} the morphism
$G \to H$ is \'etale. Since $f$ is representable by algebraic spaces,
we see that $G \to H$ is a monomorphism. Hence $G \to H$ is an open
immersion, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-etale-universally-injective-open}.
By assumption $H \to U$ is proper.

\medskip\noindent
With these preparations out of the way, we can prove the lemma as follows.
The inverse image of the subset of $|\mathcal{X}|$ of the lemma is
clearly the set of $u \in U$ such that $G_u \to H_u$ is an isomorphism
(since after all $G_u$ is an open sub group algebraic space of $H_u$).
This is an open subset because the complement is
the image of the closed subset $|H| \setminus |G|$ and $|H| \to |U|$
is closed. By
Properties of Stacks, Lemma \ref{stacks-properties-lemma-open-substacks}
we can consider the corresponding open substack $\mathcal{U}$ of $\mathcal{X}$.
The final statement of the lemma follows from
applying Lemma \ref{lemma-aut-iso-unramified}
to $\mathcal{U} \to \mathcal{Y}$.
\end{proof}

\begin{lemma}
\label{lemma-base-change-stabilizer-preserving}
Let
$$
\xymatrix{
\mathcal{X}' \ar[r] \ar[d]_{f'} & \mathcal{X} \ar[d]^f \\
\mathcal{Y}' \ar[r] & \mathcal{Y}
}
$$
be a cartesian diagram of algebraic stacks.
\begin{enumerate}
\item Let $x' \in |\mathcal{X}'|$ with image $x \in |\mathcal{X}|$.
If $f$ induces an isomorphism between automorphism groups at
$x$ and $f(x)$ (Remark \ref{remark-identify-automorphism-groups}), then
$f'$ induces an isomorphism between automorphism groups at $x'$ and $f(x')$.
\item If $\mathcal{I}_\mathcal{X} \to
\mathcal{X} \times_\mathcal{Y} \mathcal{I}_\mathcal{Y}$ is an isomorphism,
then $\mathcal{I}_{\mathcal{X}'} \to
\mathcal{X}' \times_{\mathcal{Y}'} \mathcal{I}_{\mathcal{Y}'}$
is an isomorphism.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-stabilizer-preserving-points-cartesian}
Let
$$
\xymatrix{
\mathcal{X}' \ar[r] \ar[d]_{f'} & \mathcal{X} \ar[d]^f \\
\mathcal{Y}' \ar[r]^g & \mathcal{Y}
}
$$
be a cartesian diagram of algebraic stacks. If $f$ induces an isomorphism
between automorphism groups at points
(Remark \ref{remark-identify-automorphism-groups}),
then
$$
\Mor(\Spec(k), \mathcal{X}')
\longrightarrow
\Mor(\Spec(k), \mathcal{Y}') \times \Mor(\Spec(k), \mathcal{X})
$$
is injective on isomorphism classes for any field $k$.
\end{lemma}

\begin{proof}
We have to show that given $(y', x)$ there is at most one $x'$
mapping to it.
By our construction of $2$-fibre products, a morphism
$x'$ is given by a triple $(x, y', \alpha)$
where  $\alpha : g \circ y' \to f \circ x$ is a $2$-morphism.
Now, suppose we have a second such triple $(x, y', \beta)$.
Then $\alpha$ and $\beta$ differ by a $k$-valued point
$\epsilon$ of the automorphism group algebraic space $G_{f(x)}$.
Since $f$ induces an isomorphism $G_x \to G_{f(x)}$ by
assumption, this means we can lift $\epsilon$ to a $k$-valued point
$\gamma$ of $G_x$. Then $(\gamma, \text{id}) : (x, y', \alpha) \to
(x, y', \beta)$ is an isomorphism as desired.
\end{proof}

\begin{lemma}
\label{lemma-etale-iso}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
Assume $f$ is separated, \'etale, $f$ induces an isomorphism
between automorphism groups at points
(Remark \ref{remark-identify-automorphism-groups})
and for every algebraically closed field $k$ the functor
$$
f : \Mor(\Spec(k), \mathcal{X}) \longrightarrow \Mor(\Spec(k), \mathcal{Y})
$$
is an equivalence. Then $f$ is an isomorphism.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-universally-injective} we see that $f$ is
universally injective. Combining
Lemmas \ref{lemma-stabilizer-preserving} and
\ref{lemma-aut-iso-unramified}
we see that $f$ is representable by algebraic spaces.
Hence $f$ is an open immersion by Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-etale-universally-injective-open}.
To finish we remark that the condition in the lemma also guarantees
that $f$ is surjective.
\end{proof}







\section{Normalization}
\label{section-normalization}

\noindent
This section is the analogue of
Morphisms of Spaces, Section \ref{spaces-morphisms-section-normalization}.

\begin{lemma}
\label{lemma-prepare-normalization}
Let $\mathcal{X}$ be an algebraic stack. The following are equivalent
\begin{enumerate}
\item there is a surjective smooth morphism $U \to \mathcal{X}$ where $U$
is a scheme such that every quasi-compact open of $U$ has
finitely many irreducible components,
\item for every scheme $U$ and every smooth morphism
$U \to \mathcal{X}$ every quasi-compact open of $U$ has finitely many
irreducible components,
\item for every algebraic space $Y$ and smooth morphism $Y \to \mathcal{X}$
the space $Y$ satisfies the equivalent conditions of
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-prepare-normalization},
and
\item for every quasi-compact algebraic stack $\mathcal{Y}$ smooth over
$\mathcal{X}$ the space $|\mathcal{Y}|$ has finitely many irreducible
components.
\end{enumerate}
\end{lemma}

\begin{proof}
The equivalence of (1), (2), and (3) follow from
Descent, Lemma \ref{descent-lemma-locally-finite-nr-irred-local-fppf},
Properties of Stacks, Lemma \ref{stacks-properties-lemma-type-property}, and
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-prepare-normalization}.
It is also clear from these references that condition (4)
implies condition (1). Conversely, assume the equivalent conditions
(1), (2), and (3) hold and let $\mathcal{Y} \to \mathcal{X}$ be a
smooth morphism of algebraic stacks with $\mathcal{Y}$
quasi-compact. Then we can choose an affine scheme $V$ and a surjective
smooth morphism $V \to \mathcal{Y}$ by Properties of Stacks, Lemma
\ref{stacks-properties-lemma-quasi-compact-stack}.
Since $V$ has finitely many irreducible components by (2) and since
$|V| \to |\mathcal{Y}|$ is surjective and continuous, we conclude that
$|\mathcal{Y}|$ has finitely many irreducible components by Topology, Lemma
\ref{topology-lemma-surjective-continuous-irreducible-components}.
\end{proof}

\begin{lemma}
\label{lemma-normalization}
Let $\mathcal{X}$ be an algebraic stack satisfying
the equivalent conditions of Lemma \ref{lemma-prepare-normalization}.
Then there exists an integral morphism of algebraic stacks
$$
\mathcal{X}^\nu \longrightarrow \mathcal{X}
$$
such that for every scheme $U$ and smooth morphism $U \to \mathcal{X}$
the fibre product $\mathcal{X}^\nu \times_\mathcal{X} U$
is the normalization of $U$.
\end{lemma}

\begin{proof}
Let $U \to \mathcal{X}$ be a surjective smooth morphism where $U$ is a scheme.
Set $R = U \times_\mathcal{X} U$. Recall that we obtain a smooth groupoid
$(U, R, s, t, c)$ in algebraic spaces and a presentation
$\mathcal{X} = [U/R]$ of $\mathcal{X}$, see Algebraic Stacks,
Lemmas \ref{algebraic-lemma-map-space-into-stack} and
\ref{algebraic-lemma-stack-presentation} and
Definition \ref{algebraic-definition-presentation}.
The assumption on $\mathcal{X}$ means that the normalization
$U^\nu$ of $U$ is defined, see Morphisms, Definition
\ref{morphisms-definition-normalization}.
By Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-normalization}
taking normalization commutes with smooth morphisms of algebraic spaces.
Thus we see that the normalization $R^\nu$ of $R$
is isomorphic to both $R \times_{s, U} U^\nu$ and $U^\nu \times_{U, t} R$.
Thus we obtain two smooth morphisms
$s^\nu : R^\nu \to U^\nu$ and $t^\nu : R^\nu \to U^\nu$
of algebraic spaces. A formal computation with fibre products shows that
$R^\nu \times_{s^\nu, U^\nu, t^\nu} R^\nu$ is the normalization
of $R \times_{s, U, t} R$. Hence the smooth morphism
$c : R \times_{s, U, t} R \to R$ extends to $c^\nu$ as well.
Similarly, the inverse $i : R \to R$ (an isomorphism) induces
an isomorphism $i^\nu : R^\nu \to R^\nu$. Finally, the identity
$e : U \to R$ lifts to $e^\nu : U^\nu \to R^\nu$ for example
because $e$ is a section of $s$ and $R^\nu = R \times_{U, s} U^\nu$.
We claim that $(U^\nu, R^\nu, s^\nu, t^\nu, c^\nu)$ is
a smooth groupoid in algebraic spaces. To see this involves checking
the axioms (1), (2)(a), (2)(b), (3)(a), and (3)(b) of
Groupoids, Section \ref{groupoids-section-groupoids}
for $(U^\nu, R^\nu, s^\nu, t^\nu, c^\nu, e^\nu, i^\nu)$.
For example, for (1) we have to see that the two morphisms
$a, b : R^\nu \times_{s^\nu, U^\nu, t^\nu} R^\nu
\times_{s^\nu, U^\nu, t^\nu} R^\nu \to R^\nu$ we obtain are the same.
This holds because we know that the corresponding pair of morphisms
$R \times_{s, U, t} R \times_{s, U, t} R \to R$
are the same and the morphisms $a$ and $b$ are the unique extensions
of this morphism to the normalizations. Similarly for the other
axioms.

\medskip\noindent
Consider the algebraic stack $\mathcal{X}^\nu = [U^\nu/R^\nu]$
(Algebraic Stacks, Theorem
\ref{algebraic-theorem-smooth-groupoid-gives-algebraic-stack}).
Since we have a morphism
$(U^\nu, R^\nu, s^\nu, t^\nu, c^\nu) \to (U, R, s, t, c)$
of groupoids in algebraic spaces, we obtain a morphism
$\nu : \mathcal{X}^\nu \to \mathcal{X}$ of algebraic stacks.
Since $R^\nu = R \times_{s, U} U^\nu$ we see that
$U^\nu = \mathcal{X}^\nu \times_\mathcal{X} U$ by
Groupoids in Spaces, Lemma
\ref{spaces-groupoids-lemma-criterion-fibre-product}.
In particular, as $U^\nu \to U$ is integral, we see that $\nu$ is integral.
We omit the verification that the base change property
stated in the lemma holds for every smooth morphism from a scheme to
$\mathcal{X}$.
\end{proof}

\noindent
This leads us to the following definition.

\begin{definition}
\label{definition-normalization}
Let $\mathcal{X}$ be an algebraic stack satisfying the
equivalent conditions of Lemma \ref{lemma-prepare-normalization}.
We define the {\it normalization} of $\mathcal{X}$ as the morphism
$$
\nu : \mathcal{X}^\nu \longrightarrow \mathcal{X}
$$
constructed in Lemma \ref{lemma-normalization}.
\end{definition}










\section{Points and specializations}
\label{section-specializations}

\noindent
This section is the analogue of
Decent Spaces, Section \ref{decent-spaces-section-specializations}.

\begin{lemma}
\label{lemma-specialization}
Let $\mathcal{X}$ be an algebraic stack. Let $f : U \to \mathcal{X}$
be a smooth morphism where $U$ is an algebraic space. Let
$x' \leadsto x$ be a specialization of points of $|\mathcal{X}|$.
Let $u \in |U|$ with $f(u) = x$. If $(\mathcal{X}, x')$ satisfy the
equivalent conditions of Properties of Stacks,
Lemma \ref{stacks-properties-lemma-UR-quasi-compact-above-x},
then there exists a specialization
$u' \leadsto u$ in $|U|$ with $f(u') = x'$.
\end{lemma}

\begin{proof}
Choose an \'etale morphism $(U_1, u_1) \to (U, u)$ where $U_1$
is an affine scheme. Then we may and do replace $U$ by $U_1$.
Thus we may assume $U$ is an affine scheme.
Consider the algebraic space $R = U \times_\mathcal{X} U$
with smooth projections $t, s : R \to U$.
Choose a point $w \in U$ mapping to $x'$; this is possible as
$f : |U| \to |\mathcal{X}|$ is open.
By our assumption on $x'$ the fibre
$F' = t^{-1}(w) = R \times_{t, U} w$
of $t : R \to U$ over $w$ is a quasi-compact algebraic space.
Choose an affine scheme $T$ and a surjective \'etale morphism
$T \to F'$. The fact that $x' \leadsto x$ means that $u$ is in
the closure of the image of the morphism
$$
T \to F' \to R \xrightarrow{s} U
$$
Namely, this image is the fibre of $|U| \to |\mathcal{X}'|$
over $x'$; if some $u \in V \subset |U|$ open is disjoint
from this fibre, then $f(V)$ is an open neighbourhood of $x$
not containing $x'$; contradiction.
Thus by Morphisms, Lemma
\ref{morphisms-lemma-reach-points-scheme-theoretic-image}
we see that  there exists $u' \in |U|$ in the fibre
of $|U| \to |\mathcal{X}|$ over $x'$ which specializes to $u$.
\end{proof}



\section{Decent algebraic stacks}
\label{section-reasonable-decent}

\noindent
This section is the analogue of
Decent Spaces, Section \ref{decent-spaces-section-reasonable-decent}.
In particular, the following definition is compatible with
the notion of a decent algebraic space defined there.

\begin{definition}
\label{definition-decent}
Let $\mathcal{X}$ be an algebraic stack. We say $\mathcal{X}$ is {\it decent}
if for every $x \in |\mathcal{X}|$ the equivalent conditions of
Properties of Stacks, Lemma
\ref{stacks-properties-lemma-UR-quasi-compact-above-x} are satisfied.
\end{definition}

\noindent
Some people would rephrase this definition by saying that
every point of $\mathcal{X}$ is quasi-compact.
A slightly stronger condition would be to ask that any morphism
$\Spec(k) \to \mathcal{X}$ in the equivalence class of $x$ is
quasi-separated as well as quasi-compact.

\begin{lemma}
\label{lemma-quasi-separated-decent}
A quasi-separated algebraic stack $\mathcal{X}$ is decent.
More generally, if $\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$
is quasi-compact, then $\mathcal{X}$ is decent.
\end{lemma}

\begin{proof}
Namely, if $\mathcal{X}$ is quasi-separated, then
any morphism $f : T \to \mathcal{X}$ whose source is a
quasi-compact scheme $T$, is quasi-compact, see
Lemma \ref{lemma-quasi-compact-permanence}.
If $\Delta$ is on known to be quasi-compact, then one uses the
description
$$
T \times_{f, \mathcal{X}, f'} T' =
(T \times T')
\times_{(f, f'), \mathcal{X} \times \mathcal{X}, \Delta}
\mathcal{X}
$$
to prove this. Details omitted.
\end{proof}

\begin{lemma}
\label{lemma-representable-decent}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism
of algebraic stacks. Assume $Y$ is decent
and $f$ is representable (by schemes) or $f$ is representable
by algebraic spaces and quasi-separated.
Then $\mathcal{X}$ is decent.
\end{lemma}

\begin{proof}
Let $x \in |\mathcal{X}|$ with image $y \in |\mathcal{Y}|$.
Choose a morphism $y : \Spec(k) \to \mathcal{Y}$
in the equivalence class defining $y$.
Set $\mathcal{X}_y = \Spec(k) \times_{y, \mathcal{Y}} \mathcal{X}$.
Choose a point $x' \in |\mathcal{X}_y|$ mapping to $x$, see
Properties of Stacks, Lemma \ref{stacks-properties-lemma-points-cartesian}.
Choose a morphism $x' : \Spec(k') \to \mathcal{X}_y$ in the equivalence
class of $x'$. Diagram
$$
\xymatrix{
\Spec(k') \ar[r]_{x'} &
\mathcal{X}_y \ar[r] \ar[d] &
\mathcal{X} \ar[d] \\
&
\Spec(k) \ar[r]^y &
\mathcal{Y}
}
$$
The morphism $y$ is quasi-compact if $\mathcal{Y}$ is decent.
Hence $\mathcal{X}_y \to \mathcal{X}$ is quasi-compact as a base change
(Lemma \ref{lemma-base-change-quasi-compact}).
Thus to conclude it suffices to prove that $x'$ is quasi-compact
(Lemma \ref{lemma-composition-quasi-compact}).
If $f$ is representable, then $\mathcal{X}_y$ is a scheme
and $x'$ is quasi-compact.
If $f$ is representable by algebraic spaces and quasi-separated,
then $\mathcal{X}_y$ is a quasi-separated algebraic space
and hence decent (Decent Spaces, Lemma
\ref{decent-spaces-lemma-properties-trivial-implications}).
\end{proof}

\begin{lemma}
\label{lemma-qc-decent}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
If $f$ is quasi-compact and surjective and $\mathcal{X}$ is decent,
then $\mathcal{Y}$ is decent.
\end{lemma}

\begin{proof}
Let $x : \Spec(k) \to \mathcal{X}$ be a morphism where $k$ is a field
and denote $y = f \circ x$. Since $f$ is surjective, every point
of $|\mathcal{Y}|$ arises in this manner, see Properties of Stacks,
Lemma \ref{stacks-properties-lemma-characterize-surjective}.
Consider an affine scheme $T$ and morphism
$T \to \mathcal{Y}$. It suffices to show that
$T \times_{\mathcal{Y}, y} \Spec(k)$ is quasi-compact, see
Lemma \ref{lemma-check-quasi-compact-covering}.
We have
$$
(T \times_{\mathcal{Y}} \mathcal{X}) \times_{\mathcal{X}, x} \Spec(k) =
T \times_{\mathcal{Y}, y} \Spec(k)
$$
The morphism $T \times_{\mathcal{Y}} \mathcal{X} \to T$ is quasi-compact
hence $T \times_\mathcal{Y} \mathcal{X}$ is quasi-compact. Since $x$ is
a quasi-compact morphism as $\mathcal{X}$ is decent
we see that the displayed fibre product is quasi-compact.
\end{proof}

\begin{lemma}
\label{lemma-gerbe-decent}
Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks.
If $\mathcal{X}$ is a gerbe over $\mathcal{Y}$ and $\mathcal{X}$ is decent,
then $\mathcal{Y}$ is decent.
\end{lemma}

\begin{proof}
Assume $\mathcal{X}$ is a gerbe over $\mathcal{Y}$ and $\mathcal{X}$ is decent.
Note that $f$ is a universal homeomorphism by
Lemma \ref{lemma-gerbe-bijection-points}.
Thus the lemma follows from Lemma \ref{lemma-qc-decent}.
\end{proof}



\section{Points on decent stacks}
\label{section-points-decent}

\noindent
This section is the analogue of Decent Spaces, Section
\ref{decent-spaces-section-points}.
We do not know whether or not the topological space associated
to a decent algebraic stack is always sober; see
Proposition \ref{proposition-decent-sober} for a slightly weaker result.

\begin{lemma}
\label{lemma-kolmogorov}
Let $\mathcal{X}$ be a decent algebraic stack.
Then $|\mathcal{X}|$ is Kolmogorov (see
Topology, Definition \ref{topology-definition-generic-point}).
\end{lemma}

\begin{proof}
Let $x_1, x_2 \in |\mathcal{X}|$ with $x_1 \leadsto x_2$ and
$x_2 \leadsto x_1$. We have to show that $x_1 = x_2$.
Let $\mathcal{Z} \subset \mathcal{X}$ be the reduced closed
substack with $|\mathcal{Z}|$ equal to
$\overline{\{x_1\}} = \overline{\{x_2\}}$.
By Lemma \ref{lemma-representable-decent}
we see that $\mathcal{Z}$ is decent.
After replacing $\mathcal{X}$ by $\mathcal{Z}$ we reduce to
the case discussed in the next paragraph.

\medskip\noindent
Assume $|\mathcal{X}|$ is irreducible with generic points
$x_1$ and $x_2$. Pick an affine scheme $U$ and $u_1, u_2 \in U$
and a smooth morphism $f : U \to \mathcal{X}$ such that
$f(u_i) = x_i$. Then we find a third point $u_3 \in U$
which is the generic point of an irreducible component of $U$
whose image $x_3 \in |\mathcal{X}|$ is {\it also} a
generic point of $|\mathcal{X}|$. Namely, we can simply
choose $u_3$ any generic point of an irreducible component
passing through $u_1$ (or $u_2$ if you like).
In the next paragraph we will show that $x_1 = x_3$ and $x_2 = x_3$
which will prove what we want.

\medskip\noindent
By symmetry it suffices to prove that $x_1 = x_3$. Since $x_1$
is a generic point of $|\mathcal{X}|$ we have a specialization
$x_1 \leadsto x_3$.
By Lemma \ref{lemma-specialization} we can find a specialization
$u'_1 \leadsto u_3$ in $U$ (!) mapping to $x_1 \leadsto x_3$.
However, $u_3$ is the generic point of an irreducible component
and hence $u'_1 = u_3$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-decent-locally-noetherian-sober}
Let $\mathcal{X}$ be a decent, locally Noetherian algebraic stack.
Then $|\mathcal{X}|$ is a sober locally Noetherian topological space.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-Noetherian-topology} the topological space $|\mathcal{X}|$
is locally Noetherian. By Lemma \ref{lemma-kolmogorov} the topological space
$|\mathcal{X}|$ is Kolmogorov. By
Lemma \ref{lemma-locally-Noetherian-quasi-sober} the topological space
$|\mathcal{X}|$ is quasi-sober. This finishes the proof, see
Topology, Definition \ref{topology-definition-generic-point}.
\end{proof}

\begin{proposition}
\label{proposition-decent-sober}
Let $\mathcal{X}$ be a decent algebraic stack such that
$\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is quasi-compact.
Then $|\mathcal{X}|$ is sober.
\end{proposition}

\begin{proof}
By Lemma \ref{lemma-kolmogorov} we know that $|\mathcal{X}|$ is Kolmogorov
(in fact we will reprove this).
Let $T \subset |\mathcal{X}|$ be an irreducible closed subset.
We have to show $T$ has a generic point.
Let $\mathcal{Z} \subset \mathcal{X}$ be the reduced induced
closed substack corresponding to $T$, see Properties of Stacks, Definition
\ref{stacks-properties-definition-reduced-induced-stack}.
Since $\mathcal{Z} \to \mathcal{X}$ is a closed immersion,
we see that $\mathcal{Z}$ is a decent algebraic stack, see
Lemma \ref{lemma-representable-decent}.
Also, the morphism $\mathcal{I}_\mathcal{Z} \to \mathcal{Z}$
is the base change of $\mathcal{I}_\mathcal{X} \to \mathcal{X}$
(Lemma \ref{lemma-monomorphism-cartesian-square-inertia}).
Hence $\mathcal{I}_\mathcal{Z} \to \mathcal{Z}$ is quasi-compact
(Lemma \ref{lemma-base-change-quasi-compact}).
Thus we reduce to the case discussed in the next paragraph.

\medskip\noindent
Assume $\mathcal{X}$ is decent,
$\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is quasi-compact,
$\mathcal{X}$ is reduced, and $|\mathcal{X}|$ irreducible.
We have to show $|\mathcal{X}|$ has a generic point.
By Proposition \ref{proposition-open-stratum}.
there exists a dense open substack $\mathcal{U} \subset \mathcal{X}$
which is a gerbe. In other words, $|\mathcal{U}| \subset |\mathcal{X}|$
is open dense. Thus we may assume that $\mathcal{X}$ is a gerbe
in addition to all the other properties.
Say $\mathcal{X} \to X$ turns $\mathcal{X}$ into a gerbe over the
algebraic space $X$. Then $|\mathcal{X}| \cong |X|$ by
Lemma \ref{lemma-gerbe-bijection-points}.
In particular, $X$ is quasi-compact and $|X|$ is irreducible.
Also, by Lemma \ref{lemma-gerbe-decent}
we see that $X$ is a decent algebraic space.
Then $|\mathcal{X}| = |X|$ is sober by
Decent Spaces, Proposition \ref{decent-spaces-proposition-reasonable-sober}
and hence has a (unique) generic point.
\end{proof}






\section{Integral algebraic stacks}
\label{section-integral-stacks}

\noindent
This section is the analogue of Spaces over Fields, Section
\ref{spaces-over-fields-section-integral-spaces}.
Motivated by the considerations in that section and by the result
of Proposition \ref{proposition-decent-sober} we define an
integral algebraic stack as follows (and it does not conflict
with the already existing definitions of integral schemes and
integral algebraic spaces).

\begin{definition}
\label{definition-integral-algebraic-stack}
We say an algebraic stack $\mathcal{X}$ is
{\it integral} if it is reduced, decent,
$\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is quasi-compact,
and $|\mathcal{X}|$ is irreducible.
\end{definition}

\noindent
Note that if $\mathcal{X}$ is quasi-separated, then
for it to be integral, it suffices that $\mathcal{X}$ is reduced
and that $|\mathcal{X}|$ is irreducible, see Lemma \ref{lemma-totaro-case}.

\begin{lemma}
\label{lemma-structure-integral-stack}
Let $\mathcal{X}$ be an integral algebraic stack. Then
\begin{enumerate}
\item $|\mathcal{X}|$ is sober, irreducible, and has a unique generic point,
\item there exists an open substack $\mathcal{U} \subset \mathcal{X}$ 
which is a gerbe over an integral scheme $U$.
\end{enumerate}
\end{lemma}

\begin{proof}
Proposition \ref{proposition-decent-sober} tells us that $|\mathcal{X}|$
is sober. Of course it is also irreducible and hence has a unique generic
point $x$ (by the definition of sobriety).
Proposition \ref{proposition-open-stratum} shows
the existence of a dense open $\mathcal{U} \subset \mathcal{X}$
which is a gerbe over an algebraic space $U$.
Then $U$ is a decent algebraic space by
Lemma \ref{lemma-gerbe-decent} (and the fact that $\mathcal{U}$
is decent by Lemma \ref{lemma-representable-decent}).
Since $|U| = |\mathcal{U}|$ we see that $|U|$ is irreducible.
Finally, since $\mathcal{U}$ is reduced the morphism
$\mathcal{U} \to U$ factors through $U_{red}$, see
Properties of Stacks, Lemma \ref{stacks-properties-lemma-map-into-reduction}.
Now since $\mathcal{U} \to U$ is flat, locally of finite presentation,
and surjective (Lemma \ref{lemma-gerbe-fppf}), this implies that
$U = U_{red}$, i.e., $U$ is reduced (small detail omitted).
It follows that $U$ is an integral algebraic space, see
Spaces over Fields, Definition
\ref{spaces-over-fields-definition-integral-algebraic-space}.
Then finally, we may replace $U$ (and correspondingly $\mathcal{U}$)
by an open subspace and assume that $U$ is an integral scheme, see
discussion in  Spaces over Fields, Section
\ref{spaces-over-fields-section-integral-spaces}.
\end{proof}

\begin{lemma}
\label{lemma-totaro-case}
Let $\mathcal{X}$ be an algebraic stack which is reduced and quasi-separated
and whose associated topological space $|\mathcal{X}|$ is irreducible.
Then $\mathcal{X}$ is integral.
\end{lemma}

\begin{proof}
If $\mathcal{X}$ is quasi-separated, then $\mathcal{X}$ is decent
by Lemma \ref{lemma-quasi-separated-decent}.
If $\mathcal{X}$ is quasi-separated, then
$\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$ is quasi-compact,
hence $\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is quasi-compact
as the base change of $\Delta$ by $\Delta$, see
Lemma \ref{lemma-base-change-quasi-compact}.
Thus we see that all the hypotheses of
Definition \ref{definition-integral-algebraic-stack} hold
(and we also see that we may replace ``quasi-separated'' by
``$\Delta_\mathcal{X}$ is quasi-compact'').
\end{proof}

\begin{lemma}
\label{lemma-decent-irreducible-closed}
Let $\mathcal{X}$ be a decent algebraic stack such that
$\mathcal{I}_\mathcal{X} \to \mathcal{X}$ is quasi-compact.
There are canonical bijections between the following sets:
\begin{enumerate}
\item the set of points of $\mathcal{X}$, i.e., $|\mathcal{X}|$,
\item the set of irreducible closed subsets of $|\mathcal{X}|$,
\item the set of integral closed substacks of $\mathcal{X}$.
\end{enumerate}
The bijection from (1) to (2) sends $x$ to $\overline{\{x\}}$.
The bijection from (3) to (2) sends $\mathcal{Z}$ to $|\mathcal{Z}|$.
\end{lemma}

\begin{proof}
Our map defines a bijection between (1) and (2) as $|\mathcal{X}|$ is
sober by  Proposition \ref{proposition-decent-sober}.
Given $T \subset |\mathcal{X}|$ closed and irreducible, there is a
unique reduced closed substack $\mathcal{Z} \subset \mathcal{X}$
such that $|\mathcal{Z}| = T$, namely, $\mathcal{Z}$
is the reduced induced subspace structure on $T$, see
Properties of Stacks, Definition
\ref{stacks-properties-definition-reduced-induced-stack}.
Then $\mathcal{Z}$ is an integral algebraic stack because it is
decent (Lemma \ref{lemma-representable-decent}), the
morphism $\mathcal{I}_\mathcal{Z} \to \mathcal{Z}$ is quasi-compact
(as the base change of $\mathcal{I}_\mathcal{X} \to \mathcal{X}$, see
Lemma \ref{lemma-monomorphism-cartesian-square-inertia}),
$\mathcal{Z}$ is reduced, and $|\mathcal{Z}|$ is irreducible.
\end{proof}











\input{chapters}

\bibliography{my}
\bibliographystyle{amsalpha}

\end{document}
